mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
AndroidTarget: Changes default unlocking method
Instead of using a default 'horizontal' unlocking method, now will try a diagonal swipe up as this should work most modern devices with vertical or horizontal unlocking methods.
This commit is contained in:
parent
1229af0895
commit
8839ed01ba
@ -1061,10 +1061,15 @@ class AndroidTarget(Target):
|
||||
|
||||
# Android-specific
|
||||
|
||||
def swipe_to_unlock(self, direction="horizontal"):
|
||||
def swipe_to_unlock(self, direction="diagonal"):
|
||||
width, height = self.screen_resolution
|
||||
command = 'input swipe {} {} {} {}'
|
||||
if direction == "horizontal":
|
||||
if direction == "diagonal":
|
||||
start = 100
|
||||
stop = width - start
|
||||
swipe_height = height * 2 // 3
|
||||
self.execute(command.format(start, swipe_height, stop, 0))
|
||||
elif direction == "horizontal":
|
||||
swipe_height = height * 2 // 3
|
||||
start = 100
|
||||
stop = width - start
|
||||
|
Loading…
x
Reference in New Issue
Block a user