diff options
author | Christopher Tate <ctate@google.com> | 2014-10-22 10:36:42 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2014-10-22 10:36:42 -0700 |
commit | 04e6827ace936e0cbb666d8ef94635b73672aa41 (patch) | |
tree | 0cd5f696f623723bcda0bed2221e9d02537b7a17 /packages/SettingsProvider | |
parent | 95dc663d1815704c63a5b18c94c3768068f2ff21 (diff) | |
download | frameworks_base-04e6827ace936e0cbb666d8ef94635b73672aa41.zip frameworks_base-04e6827ace936e0cbb666d8ef94635b73672aa41.tar.gz frameworks_base-04e6827ace936e0cbb666d8ef94635b73672aa41.tar.bz2 |
Fix settings db update sequence
The 'global' table only exists in the owner-user db instance; make
sure to apply global-setting update steps only when bringing up that
instance.
Bug 18069830
Change-Id: I843eabe710d9487de94690921d61adb181b45ed2
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 8c51caf..f88ea8b 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -1829,16 +1829,18 @@ public class DatabaseHelper extends SQLiteOpenHelper { } if (upgradeVersion < 114) { - db.beginTransaction(); - SQLiteStatement stmt = null; - try { - stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)" - + " VALUES(?,?);"); - loadSetting(stmt, Settings.Global.VOLTE_VT_ENABLED, ImsConfig.FeatureValueConstants.ON); - db.setTransactionSuccessful(); - } finally { - db.endTransaction(); - if (stmt != null) stmt.close(); + if (mUserHandle == UserHandle.USER_OWNER) { + db.beginTransaction(); + SQLiteStatement stmt = null; + try { + stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)" + + " VALUES(?,?);"); + loadSetting(stmt, Settings.Global.VOLTE_VT_ENABLED, ImsConfig.FeatureValueConstants.ON); + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + if (stmt != null) stmt.close(); + } } upgradeVersion = 114; } |