File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22.DS_Store
33.eslintcache
44.idea /
5+ * .iml
56.python-version
67/* .tgz
78/.env
Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ module.exports.builder = function(yargs) {
108108 , type : 'number'
109109 , demand : true
110110 } )
111+ . option ( 'screen-reset' , {
112+ describe : 'Go back to home screen and reset screen rotation ' +
113+ 'when user releases device. Negate with --no-screen-reset.'
114+ , type : 'boolean'
115+ , default : true
116+ } )
111117 . option ( 'screen-ws-url-pattern' , {
112118 describe : 'The URL pattern to use for the screen WebSocket.'
113119 , type : 'string'
@@ -165,5 +171,6 @@ module.exports.handler = function(argv) {
165171 , muteMaster : argv . muteMaster
166172 , lockRotation : argv . lockRotation
167173 , cleanup : argv . cleanup
174+ , screenReset : argv . screenReset
168175 } )
169176}
Original file line number Diff line number Diff line change @@ -156,6 +156,12 @@ module.exports.builder = function(yargs) {
156156 , type : 'string'
157157 , default : 'localhost'
158158 } )
159+ . option ( 'screen-reset' , {
160+ describe : 'Go back to home screen and reset screen rotation ' +
161+ 'when user releases device. Negate with --no-screen-reset.'
162+ , type : 'boolean'
163+ , default : true
164+ } )
159165 . option ( 'serial' , {
160166 describe : 'Only use devices with these serial numbers.'
161167 , type : 'array'
@@ -282,6 +288,7 @@ module.exports.handler = function(argv) {
282288 . concat ( argv . allowRemote ? [ '--allow-remote' ] : [ ] )
283289 . concat ( argv . lockRotation ? [ '--lock-rotation' ] : [ ] )
284290 . concat ( ! argv . cleanup ? [ '--no-cleanup' ] : [ ] )
291+ . concat ( ! argv . screenReset ? [ '--no-screen-reset' ] : [ ] )
285292 . concat ( argv . serial ) )
286293
287294 // auth
Original file line number Diff line number Diff line change @@ -122,6 +122,12 @@ module.exports.builder = function(yargs) {
122122 , type : 'number'
123123 , default : 30000
124124 } )
125+ . option ( 'screen-reset' , {
126+ describe : 'Go back to home screen and reset screen rotation ' +
127+ 'when user releases device. Negate with --no-screen-reset.'
128+ , type : 'boolean'
129+ , default : true
130+ } )
125131 . option ( 'screen-ws-url-pattern' , {
126132 describe : 'The URL pattern to use for the screen WebSocket.'
127133 , type : 'string'
@@ -199,6 +205,7 @@ module.exports.handler = function(argv) {
199205 } , [ ] ) )
200206 . concat ( argv . lockRotation ? [ '--lock-rotation' ] : [ ] )
201207 . concat ( ! argv . cleanup ? [ '--no-cleanup' ] : [ ] )
208+ . concat ( ! argv . screenReset ? [ '--no-screen-reset' ] : [ ] )
202209
203210 return fork ( cli , args )
204211 }
Original file line number Diff line number Diff line change @@ -104,8 +104,10 @@ module.exports = syrup.serial()
104104 } )
105105
106106 plugin . on ( 'leave' , function ( ) {
107- service . pressKey ( 'home' )
108- service . thawRotation ( )
107+ if ( options . screenReset ) {
108+ service . pressKey ( 'home' )
109+ service . thawRotation ( )
110+ }
109111 service . releaseWakeLock ( )
110112 } )
111113
You can’t perform that action at this time.
0 commit comments