From 36a5c9978f8ea0f61353457074814eacc4a6057a Mon Sep 17 00:00:00 2001 From: Adnan Begovic Date: Fri, 20 Nov 2015 17:30:07 -0800 Subject: SettingsProvider: Don't drop tables if we're matching CM DB version. Change-Id: I8a4ff7a19f440bd088b80d76746bc97c6a5b283d --- .../src/com/android/providers/settings/SettingsProvider.java | 5 +++-- 1 file 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; } -- cgit v1.1