mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 05:53:25 +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:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user