Bug 1081590: Actually call the downgrade function in ConfigurationMigrator. r=rnewman
authorChris Kitching <chriskitching@linux.com>
Sun, 12 Oct 2014 01:27:02 +0100
changeset 210582 a615a67cce1e2950c121361ffa9c89f136693a6f
parent 210581 a95e2de845ff0ee273e845824f96e7202c148f44
child 210583 b008a281364db05e62fd8b4974cd71cffa748b11
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersrnewman
bugs1081590
milestone36.0a1
Bug 1081590: Actually call the downgrade function in ConfigurationMigrator. r=rnewman
mobile/android/base/sync/config/ConfigurationMigrator.java
--- a/mobile/android/base/sync/config/ConfigurationMigrator.java
+++ b/mobile/android/base/sync/config/ConfigurationMigrator.java
@@ -366,17 +366,17 @@ public class ConfigurationMigrator {
     }
 
     // Now we're down to either version 0 or version 1.
     if (currentVersion == 0 && desiredVersion == 1) {
       Logger.info(LOG_TAG, "Upgrading from version 0 to version 1.");
       upgrade0to1(context, accountManager, account, product, username, serverURL, profile);
     } else if (currentVersion == 1 && desiredVersion == 0) {
       Logger.info(LOG_TAG, "Upgrading from version 0 to version 1.");
-      upgrade0to1(context, accountManager, account, product, username, serverURL, profile);
+      downgrade1to0(context, accountManager, account, product, username, serverURL, profile);
     } else {
       Logger.warn(LOG_TAG, "Don't know how to migrate from version " + currentVersion + " to " + desiredVersion + ".");
     }
 
     Logger.info(LOG_TAG, "Migrated from version " + currentVersion + " to version " + desiredVersion + ".");
     versionPrefs.edit().putLong(SyncConfiguration.PREF_PREFS_VERSION, desiredVersion).commit();
   }
 }