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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user