diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-12-06 10:27:04 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-12-06 10:27:04 -0800 |
commit | ea25ea7ef30be14dd940f1667e0308bfff5b4d85 (patch) | |
tree | d3c4203fce24db2d11b8198fd8e57e8db4f131f9 /packages/SettingsProvider | |
parent | 4079702ac27b51282a25de5f7c20f6fba6b71995 (diff) | |
parent | 55f937abe1a4fedb86c2679c66f0b5220ec3780e (diff) | |
download | frameworks_base-ea25ea7ef30be14dd940f1667e0308bfff5b4d85.zip frameworks_base-ea25ea7ef30be14dd940f1667e0308bfff5b4d85.tar.gz frameworks_base-ea25ea7ef30be14dd940f1667e0308bfff5b4d85.tar.bz2 |
Merge "Adding a system preference whether to speak passwords in accessibility mode." into ics-mr1
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 | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 7a98615..1ebed1f 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -80,6 +80,9 @@ <!-- Default for Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION --> <bool name="def_accessibility_script_injection">false</bool> + <!-- Default for Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD --> + <bool name="def_accessibility_speak_password">false</bool> + <!-- Default for Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS --> <string name="def_accessibility_web_content_key_bindings" translatable="false"> <!-- DPAD/Trackball UP - traverse previous on current axis and send an event. --> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index ac2369a..6258652 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -63,7 +63,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 = 71; + private static final int DATABASE_VERSION = 72; private Context mContext; @@ -952,6 +952,22 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 71; } + if (upgradeVersion == 71) { + // New setting to specify whether to speak passwords in accessibility mode. + db.beginTransaction(); + SQLiteStatement stmt = null; + try { + stmt = db.compileStatement("INSERT INTO secure(name,value)" + + " VALUES(?,?);"); + loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, + R.bool.def_accessibility_speak_password); + } finally { + db.endTransaction(); + if (stmt != null) stmt.close(); + } + upgradeVersion = 72; + } + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { @@ -1489,6 +1505,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.TOUCH_EXPLORATION_ENABLED, R.bool.def_touch_exploration_enabled); + + loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, + R.bool.def_accessibility_speak_password); } finally { if (stmt != null) stmt.close(); } |