summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-04-19 12:34:01 +0100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-04-19 12:37:12 +0100
commit73cd1d170cca3ffbb39421f250fb8c419c17928c (patch)
tree9497d5ec115ab4e0585de39865b252fe080ab793
parent3598bcc02d53eac8d645912a71cccb1da3af8ddb (diff)
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 <milosz.wasilewski@linaro.org>
-rwxr-xr-xautomated/lib/android-test-lib7
1 files changed, 7 insertions, 0 deletions
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