Skip to content

Commit 4694782

Browse files
author
adrianbartyczak
committed
Update the methods used in scripts turnandroiddevscreenon and turnandroiddevscreenoff
1 parent 8756d9f commit 4694782

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/mobile_device_management-android/hardware_management/turnandroiddevscreenoff

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
# Turn an Android device screen off.
88
#
99

10-
readonly IS_SCREEN_ON="$(adb -d shell 'dumpsys power' | grep mScreenOn)"
10+
readonly IS_SCREEN_ON="$(adb -d shell 'dumpsys power' | grep \
11+
'mHoldingDisplaySuspendBlocker=')"
1112

1213
if [[ "${IS_SCREEN_ON##*=}" = *'true'* ]]; then
1314
adb -d shell 'input keyevent KEYCODE_POWER;'

scripts/mobile_device_management-android/hardware_management/turnandroiddevscreenon

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
# turnandroiddevscreenon
55
#
66
# Description:
7-
# Turn an Android device screen on,
7+
# Turn an Android device screen on.
88
#
99

10-
readonly IS_SCREEN_ON="$(adb -d shell 'dumpsys power' | grep mScreenOn)"
10+
readonly IS_SCREEN_ON="$(adb -d shell 'dumpsys power' | grep \
11+
'mHoldingDisplaySuspendBlocker=')"
1112

1213
if [[ "${IS_SCREEN_ON##*=}" = *'false'* ]]; then
1314
adb -d shell 'input keyevent KEYCODE_POWER;'

0 commit comments

Comments
 (0)