1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Lock rotation when devices are being used if --lock-rotation is given.

This commit is contained in:
Simo Kinnunen 2015-08-25 18:17:53 +09:00
parent f179f80238
commit a08f50e155
3 changed files with 12 additions and 2 deletions

View file

@ -104,6 +104,7 @@ module.exports = syrup.serial()
plugin.on('leave', function() {
service.pressKey('home')
service.thawRotation()
service.releaseWakeLock()
})

View file

@ -365,7 +365,7 @@ module.exports = syrup.serial()
plugin.rotate = function(rotation) {
return runAgentCommand(
apk.wire.MessageType.SET_ROTATION
, new apk.wire.SetRotationRequest(rotation, false)
, new apk.wire.SetRotationRequest(rotation, options.lockRotation || false)
)
}