CMSettings: Fix upgrade from cm-12.1 after weather changes
* Only the owner can write to the global db Change-Id: Iec7736c28ff0bc7a35dae8bbc85ca2b1c137da49
This commit is contained in:
parent
b77b8b5a70
commit
4a0ad7cfbb
@ -202,6 +202,7 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (upgradeVersion < 5) {
|
if (upgradeVersion < 5) {
|
||||||
|
if (mUserHandle == UserHandle.USER_OWNER) {
|
||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
SQLiteStatement stmt = null;
|
SQLiteStatement stmt = null;
|
||||||
try {
|
try {
|
||||||
@ -214,6 +215,7 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
|
|||||||
if (stmt != null) stmt.close();
|
if (stmt != null) stmt.close();
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
upgradeVersion = 5;
|
upgradeVersion = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user