History log of /packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
81b7b5362e4ddc7be2a52e6be27ea732acc7b8f7 17-Mar-2016 Jeff Sharkey <jsharkey@android.com> Follow framework refactoring.

Bug: 27531029
Change-Id: I1abfb08f8bcef310d25840101e92a237eccccceb
/packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java
4a025d30d308222b78ed68897da89e2b264a5fb8 07-Dec-2015 Jeff Sharkey <jsharkey@android.com> Teach DeskClock about file-based encryption.

When running on a device that supports FBE, all persisted data is
stored in the device-encrypted area. Also mark core components as
being encryption-aware so we can schedule and trigger alarms while
the user is still locked.

Bug: 25860525
Change-Id: I7517be716468b09eed0c007600abd1937e203449
/packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java
942b3a3956221969c77f9abc447444505eea6929 10-Dec-2015 Jeff Sharkey <jsharkey@android.com> Refactoring SharedPreferences to common location.

Bug: 25860525
Change-Id: Ia015e1d9f5318aa366a35a2699da12d1669e7df5
/packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java
32e2e0440cc4219dfe200bcf025508b740ec7cb1 30-Jul-2015 James Lemieux <jplemieux@google.com> Execute cleanup code in a new app instance after a restore

BackupAgent.onRestoreFinished() is not called in a context that
allows the use of ContentResolver. Given that DeskClock will be
killed by the restore procedure in short order after
onRestoreFinished(), a callback into the application is scheduled
for 10 seconds in the future. When the callback invokes a
BroadcastReceiver within DeskClock, it detects the presence of
freshly restored data (via a shared preference) and executes a
clean up procedure from within the normal application context.

Bug: 22786516
Change-Id: Ia024529cf962ed6e6235aecc362dedf8f1cbd9c3
/packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java
1f53186f7d1d449382b2e429cd35e3312f9eb97e 29-Jul-2015 James Lemieux <jplemieux@google.com> Recreate all AlarmInstances on restore

This approach guarantees that no AlarmInstance state from the
backup device influences behavior on the restore device.

All newly scheduled AlarmInstances will be for the future. There
cannot be, for example, notifications for AlarmInstances that
were missed on the backup device.

Bug: 22798579
Change-Id: Ia73bcc16c683cb0e3602f39028a347b30900fbd4
/packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java
b5f116935f6b767d9bf7c266a9c189d706cc6d66 01-Jul-2015 James Lemieux <jplemieux@google.com> Add backup/restore support

We use the new fullContentBackup feature introduced in M. The
wrinkle that exists in our case is that the preference file
could be either:

com.android.deskclock_preferences.xml
or
com.google.android.deskclock_preferences.xml

depending on whether DeskClockGoogle overlayed DeskClock or
came as part of the device image.

So, a BackupAgent is also configured and used to intercept the
writing of the preference file on the restore device. The
preference filename is then altered to include the package name
of the receiving application, guaranteeing that the preferences
(which store world clocks, timers and stopwatch data) survive
intact.

Bug: 21818176
Change-Id: Ie4652ef8375b8db4ab6e2ae3dc40820dae618ddf
/packages/apps/DeskClock/src/com/android/deskclock/DeskClockBackupAgent.java