diff options
Diffstat (limited to 'packages')
-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 080d345..8360b72 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) { @@ -1490,6 +1506,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(); } |