diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-28 12:29:29 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-28 12:29:29 -0700 |
commit | 8cbe6e8f124456acbe8a6b8ff37aef88b0d5c6be (patch) | |
tree | ac601753b5ab10fd6f7c1eb5b37b955e33680da1 /packages/SettingsProvider | |
parent | 7c8d19d53cd48b6c748365aa6393eab2e9f09641 (diff) | |
parent | a28a16d1c2b58999d757a4cd3bc66a2f3499a2eb (diff) | |
download | frameworks_base-8cbe6e8f124456acbe8a6b8ff37aef88b0d5c6be.zip frameworks_base-8cbe6e8f124456acbe8a6b8ff37aef88b0d5c6be.tar.gz frameworks_base-8cbe6e8f124456acbe8a6b8ff37aef88b0d5c6be.tar.bz2 |
Merge "Updating the data base upgrade/creation code for the new touch exploraion setting."
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/res/values/defaults.xml | 3 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index b349030..c61da4e 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -112,6 +112,9 @@ 0x200000038=0x03000701:0x03010701:0x03020701; </string> + <!-- Default for Settings.Secure.TOUCH_EXPLORATION_ENABLED --> + <bool name="def_touch_exploration_enabled">false</bool> + <!-- Default for Settings.System.USER_ROTATION --> <integer name="def_user_rotation">0</integer> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index a5022e9..ad84112 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -891,6 +891,25 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 67; } + if (upgradeVersion == 67) { + // New setting to enable touch exploration. + db.beginTransaction(); + SQLiteStatement stmt = null; + try { + stmt = db.compileStatement("INSERT INTO secure(name,value)" + + " VALUES(?,?);"); + loadBooleanSetting(stmt, Settings.Secure.TOUCH_EXPLORATION_ENABLED, + R.bool.def_touch_exploration_enabled); + stmt.close(); + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + if (stmt != null) stmt.close(); + } + upgradeVersion = 68; + } + + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { @@ -1427,6 +1446,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadIntegerSetting(stmt, Settings.Secure.LONG_PRESS_TIMEOUT, R.integer.def_long_press_timeout_millis); + + loadBooleanSetting(stmt, Settings.Secure.TOUCH_EXPLORATION_ENABLED, + R.bool.def_touch_exploration_enabled); } finally { if (stmt != null) stmt.close(); } |