blob: bfe07da4a389895da3edafb2b2ccd0917821b790 [file] [log] [blame]
Guang Zhu18b892c2014-12-11 15:12:30 -08001This folder contains utils to properly perform timed suspend and wakeup.
2
3AlarmService - a service that client can bind to and perform:
41) holding wakelock (singleton to this service)
52) setting alarm for a specified period and releasing the wakelock; service
6 call will block until alarm has been triggered and the wakelock is held
73) releasing the wakelock
8
9SleepHelper - a self instrumentation meant as a convenient way to trigger
10the service functions from command line. Corresponding to service function
11above, supported operations are:
121) holding wakelock
13am instrument -w -e command prepare \
14 com.android.testing.sleephelper/.SetAlarm
15
162) setting alarm and wait til triggered
17am instrument -w -e command set_wait \
18 -e param <time in ms> com.android.testing.sleephelper/.SetAlarm
19Note: for the function to work properly, "-w" parameter is required
20
213) releasing wakelock
22am instrument -w -e command done \
23 com.android.testing.sleephelper/.SetAlarm