From b84049abc77322eac6326d7d55ee53d18e061c71 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 4 Oct 2010 16:56:11 -0700 Subject: [PATCH] Add functions to press home, back and menu keys. Change-Id: I54a28eb75463d5b5f8c9e2f216983aac67be0fa7 --- envsetup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/envsetup.sh b/envsetup.sh index 1f35061ef..bfafbb73e 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -1002,6 +1002,21 @@ function isviewserverstarted() adb shell service call window 3 } +function key_home() +{ + adb shell input keyevent 3 +} + +function key_back() +{ + adb shell input keyevent 4 +} + +function key_menu() +{ + adb shell input keyevent 82 +} + function smoketest() { if [ ! "$ANDROID_PRODUCT_OUT" ]; then