2b1b87f90cb776e95f66aa5514505a0b21dc3d9d |
|
24-Apr-2013 |
Andrew Sapperstein <asapperstein@google.com> |
Various fixes to the new Preferences format. Most importantly, we no longer call setMigrationComplete() until the one true migration has actually completed. Previously, the call to performMigration in VersionedPrefs would return immediately if a migration was in progress or had already taken place. As a result, setMigrationComplete() was being called once the first VersionedPrefs-derived class was created inside the migration. If the migration crashed after the setMigrationComplete completed but before the migration actually finished, migration would not be run again despite preferences not actually being migrated. Additionally, when PreferenceMigrator.migrate is run, we forcibly call commit after the VersionedPrefs object is updated (whether MailPrefs, AccountPreferences or FolderPreferences). This commit applies the change to Email2. This may help fix b/8640441 and b/8520847 as well. Change-Id: I9cf0875c6afae6cebdceed6f7444e2994a3fcc41
/packages/apps/UnifiedEmail/src/com/android/mail/preferences/BasePreferenceMigrator.java
|