diff options
author | Adnan Begovic <adnan@cyngn.com> | 2015-11-20 17:30:07 -0800 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-11-23 09:49:17 -0800 |
commit | 36a5c9978f8ea0f61353457074814eacc4a6057a (patch) | |
tree | cb97bd094a93ec3400e54cb4ac088817cb24bf9b /packages/SettingsProvider | |
parent | 1d4765daad098aa72419ec60adb3bbb31ba5efaa (diff) | |
download | frameworks_base-36a5c9978f8ea0f61353457074814eacc4a6057a.zip frameworks_base-36a5c9978f8ea0f61353457074814eacc4a6057a.tar.gz frameworks_base-36a5c9978f8ea0f61353457074814eacc4a6057a.tar.bz2 |
SettingsProvider: Don't drop tables if we're matching CM DB version.
Change-Id: I8a4ff7a19f440bd088b80d76746bc97c6a5b283d
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 73971ad..3b5d578 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -1856,6 +1856,7 @@ public class SettingsProvider extends ContentProvider { private final class UpgradeController { private static final int SETTINGS_VERSION = 122; + private static final int CM_SETTINGS_DB_VERSION = 125; private final int mUserId; @@ -1869,11 +1870,11 @@ public class SettingsProvider extends ContentProvider { SettingsRegistry.SETTINGS_TYPE_SECURE, mUserId); // Try an update from the current state. - final int oldVersion = secureSettings.getVersionLocked(); + final int oldVersion = secureSettings.getVersionLocked(); //125 final int newVersion = SETTINGS_VERSION; // If up do date - done. - if (oldVersion == newVersion) { + if ((oldVersion == newVersion || oldVersion == CM_SETTINGS_DB_VERSION)) { return; } |