From 73cd1d170cca3ffbb39421f250fb8c419c17928c Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Wed, 19 Apr 2017 12:34:01 +0100 Subject: automated: android: added disable_suspend function The function unlocks the device and sets it to be awake all the time Change-Id: I53e39a047e8983e2d08c53b650df9251a793e7ab Signed-off-by: Milosz Wasilewski --- automated/lib/android-test-lib | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib index 283b244..1e7035b 100755 --- a/automated/lib/android-test-lib +++ b/automated/lib/android-test-lib @@ -166,6 +166,13 @@ adb_shell_which() { fi } +disable_suspend() { + echo "Now disable the suspend feature..." + adb shell input keyevent 82 ##unlock the home screen + adb shell svc power stayon true ##disable the suspend + echo "The suspend feature is disabled." +} + parse_common_args() { while getopts ":s:t:" opt; do case "${opt}" in -- cgit v1.2.3