am 1e64aa33: Merge "Reset rotation-lock-for-accessibility setting on upgrade." into lmp-mr1-dev automerge: e586ab7
* commit '1e64aa3382f6d25a6ac2231f861c25ecca328285': Reset rotation-lock-for-accessibility setting on upgrade.
This commit is contained in:
@@ -71,7 +71,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
|
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
|
||||||
// is properly propagated through your change. Not doing so will result in a loss of user
|
// is properly propagated through your change. Not doing so will result in a loss of user
|
||||||
// settings.
|
// settings.
|
||||||
private static final int DATABASE_VERSION = 117;
|
private static final int DATABASE_VERSION = 118;
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private int mUserHandle;
|
private int mUserHandle;
|
||||||
@@ -1879,6 +1879,22 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
upgradeVersion = 117;
|
upgradeVersion = 117;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (upgradeVersion < 118) {
|
||||||
|
// Reset rotation-lock-for-accessibility on upgrade, since it now hides the display
|
||||||
|
// setting.
|
||||||
|
db.beginTransaction();
|
||||||
|
SQLiteStatement stmt = null;
|
||||||
|
try {
|
||||||
|
stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)"
|
||||||
|
+ " VALUES(?,?);");
|
||||||
|
loadSetting(stmt, Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0);
|
||||||
|
db.setTransactionSuccessful();
|
||||||
|
} finally {
|
||||||
|
db.endTransaction();
|
||||||
|
if (stmt != null) stmt.close();
|
||||||
|
}
|
||||||
|
upgradeVersion = 118;
|
||||||
|
}
|
||||||
// *** Remember to update DATABASE_VERSION above!
|
// *** Remember to update DATABASE_VERSION above!
|
||||||
|
|
||||||
if (upgradeVersion != currentVersion) {
|
if (upgradeVersion != currentVersion) {
|
||||||
|
|||||||
Reference in New Issue
Block a user