mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Never lock rotation so that it remains usable on device side too.
This commit is contained in:
parent
7a598af243
commit
eadc0954a1
1 changed files with 8 additions and 6 deletions
|
@ -286,6 +286,13 @@ module.exports = syrup.serial()
|
|||
)
|
||||
}
|
||||
|
||||
plugin.rotate = function(rotation) {
|
||||
return runAgentCommand(
|
||||
apk.wire.MessageType.SET_ROTATION
|
||||
, new apk.wire.SetRotationRequest(rotation, false)
|
||||
)
|
||||
}
|
||||
|
||||
plugin.freezeRotation = function(rotation) {
|
||||
return runAgentCommand(
|
||||
apk.wire.MessageType.SET_ROTATION
|
||||
|
@ -510,12 +517,7 @@ module.exports = syrup.serial()
|
|||
plugin.type(message.text)
|
||||
})
|
||||
.on(wire.RotateMessage, function(channel, message) {
|
||||
if (message.rotation >= 0) {
|
||||
plugin.freezeRotation(message.rotation)
|
||||
}
|
||||
else {
|
||||
plugin.thawRotation()
|
||||
}
|
||||
plugin.rotate(message.rotation)
|
||||
})
|
||||
})
|
||||
.return(plugin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue