diff options
| author | 2009-07-02 17:40:45 -0700 | |
|---|---|---|
| committer | 2009-07-06 11:49:49 -0700 | |
| commit | b6787f2ee535338bb96df0ab8ad70a9f82760a25 (patch) | |
| tree | 3ee86e968edcbce4bc241e19c882cc13f3e89d07 /libs/ui/Camera.cpp | |
| parent | 7e8cbfc2bc3ea2334c38db7fd2b6a1e17eefcac6 (diff) | |
Hold a wakelock during backup/restore/clear operations
We need to make sure we stay alive for the duration of a backup or (especially)
restore operation. The existing Handler-based timing system was simply not
properly functional, so it's been retooled to use a repeating alarm delivering a
broastcast PendingIntent to our registered receiver.
We acquire a partial wake lock in the broadcast receiver [i.e. while the Alarm
Manager is holding one for the duration of broadcast delivery] and pass the
wakelock object to the backup thread, which eventually releases it when it's
finsihed operations. A similar pattern is used for the threads handling restore
and clear.
Diffstat (limited to 'libs/ui/Camera.cpp')
0 files changed, 0 insertions, 0 deletions