Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b6787f2e authored by Christopher Tate's avatar Christopher Tate
Browse files

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.
parent 7e8cbfc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment