Skip to content

Commit c7749c5

Browse files
authored
fix unlock stuck (#1124)
1 parent 602408a commit c7749c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include = ["*/assets/*"]
1212
python = "^3.8"
1313
requests = "*"
1414
lxml = "*"
15-
adbutils = "^2.9.1"
15+
adbutils = ">=2.9.3,<2.10.0"
1616
Pillow = "*"
1717
retry2 = "^0.9.5"
1818
importlib-resources = {version = "*", markers = "python_version < \"3.9\""}

uiautomator2/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,8 @@ def click_post_delay(self, v: Union[int, float]):
772772
def unlock(self):
773773
""" unlock screen with swipe from left-bottom to right-top """
774774
if not self.info['screenOn']:
775-
self.shell("input keyevent WAKEUP")
775+
# WAKEUP might be stuck
776+
self.shell("input keyevent POWER")
776777
self.swipe(0.1, 0.9, 0.9, 0.1)
777778

778779
def show_float_window(self, show=True):

0 commit comments

Comments
 (0)