diff options
author | John Spurlock <jspurlock@google.com> | 2014-11-07 21:21:04 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-07 21:21:04 +0000 |
commit | bc3c32e2c212d930942bb9561e8421a793760e5d (patch) | |
tree | b9af343805ebd8eeac5dc4244498fbed9e258888 /packages/SettingsProvider | |
parent | 130a3a081f90853b505e401091af669d8d956eda (diff) | |
parent | 41cf924137feb7be16f93d5f2701f2af2a74fade (diff) | |
download | frameworks_base-bc3c32e2c212d930942bb9561e8421a793760e5d.zip frameworks_base-bc3c32e2c212d930942bb9561e8421a793760e5d.tar.gz frameworks_base-bc3c32e2c212d930942bb9561e8421a793760e5d.tar.bz2 |
am 41cf9241: am 1e64aa33: Merge "Reset rotation-lock-for-accessibility setting on upgrade." into lmp-mr1-dev automerge: e586ab7
* commit '41cf924137feb7be16f93d5f2701f2af2a74fade':
Reset rotation-lock-for-accessibility setting on upgrade.
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 9bfcadb..ddf24e8 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -71,7 +71,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // 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 // settings. - private static final int DATABASE_VERSION = 117; + private static final int DATABASE_VERSION = 118; private Context mContext; private int mUserHandle; @@ -1879,6 +1879,22 @@ public class DatabaseHelper extends SQLiteOpenHelper { 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! if (upgradeVersion != currentVersion) { |