• Home
  • History
  • Annotate
  • only in /frameworks/testing/uiautomator/utils/SleepUtils/
NameDateSize

..05-Nov-20144 KiB

AlarmService/05-Nov-20144 KiB

Android.mk05-Nov-201479

README05-Nov-2014962

SleepHelper/05-Nov-20144 KiB

WakeLoopService/05-Nov-20144 KiB

README

1This 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
24