diff options
Diffstat (limited to 'automated/lib/android-test-lib')
-rwxr-xr-x | automated/lib/android-test-lib | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib index bad964f..37035d1 100755 --- a/automated/lib/android-test-lib +++ b/automated/lib/android-test-lib @@ -206,10 +206,12 @@ adb_shell_which() { } disable_suspend() { - echo "Now disable the suspend feature..." - adb shell input keyevent 82 ##unlock the home screen - adb shell "echo lock_me > /sys/power/wake_lock" - echo "The suspend feature is disabled." + local value="${1:-true}" + + info_msg "Setting the power stayon feature to ${value}." + # unlock the home screen + adb shell input keyevent KEYCODE_MENU + adb shell svc power stayon "${value}" } parse_common_args() { |