Guang Zhu 18b892c723 shell based UI Automator source move
frameworks/testing/uiautomator -> frameworks/base/cmds/uiautomator
  (samples, utils sub folders exlcuded)
frameworks/testing/uiautomator/utils -> frameworks/base/tests/utils

no source files changed, only one line makefile update (for
UI Automator API check)

Bug: 18708851
Change-Id: I396bd386d3d55a52df18af183685daf80caa9f73
2014-12-12 17:31:38 -08:00

24 lines
962 B
Plaintext

This folder contains utils to properly perform timed suspend and wakeup.
AlarmService - a service that client can bind to and perform:
1) holding wakelock (singleton to this service)
2) setting alarm for a specified period and releasing the wakelock; service
call will block until alarm has been triggered and the wakelock is held
3) releasing the wakelock
SleepHelper - a self instrumentation meant as a convenient way to trigger
the service functions from command line. Corresponding to service function
above, supported operations are:
1) holding wakelock
am instrument -w -e command prepare \
com.android.testing.sleephelper/.SetAlarm
2) setting alarm and wait til triggered
am instrument -w -e command set_wait \
-e param <time in ms> com.android.testing.sleephelper/.SetAlarm
Note: for the function to work properly, "-w" parameter is required
3) releasing wakelock
am instrument -w -e command done \
com.android.testing.sleephelper/.SetAlarm