@@ -63,7 +63,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
6363 // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
6464 // is properly propagated through your change. Not doing so will result in a loss of user
6565 // settings.
66- private static final int DATABASE_VERSION = 71 ;
66+ private static final int DATABASE_VERSION = 72 ;
6767
6868 private Context mContext ;
6969
@@ -952,6 +952,22 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) {
952952 upgradeVersion = 71 ;
953953 }
954954
955+ if (upgradeVersion == 71 ) {
956+ // New setting to specify whether to speak passwords in accessibility mode.
957+ db .beginTransaction ();
958+ SQLiteStatement stmt = null ;
959+ try {
960+ stmt = db .compileStatement ("INSERT INTO secure(name,value)"
961+ + " VALUES(?,?);" );
962+ loadBooleanSetting (stmt , Settings .Secure .ACCESSIBILITY_SPEAK_PASSWORD ,
963+ R .bool .def_accessibility_speak_password );
964+ } finally {
965+ db .endTransaction ();
966+ if (stmt != null ) stmt .close ();
967+ }
968+ upgradeVersion = 72 ;
969+ }
970+
955971 // *** Remember to update DATABASE_VERSION above!
956972
957973 if (upgradeVersion != currentVersion ) {
@@ -1489,6 +1505,9 @@ private void loadSecureSettings(SQLiteDatabase db) {
14891505
14901506 loadBooleanSetting (stmt , Settings .Secure .TOUCH_EXPLORATION_ENABLED ,
14911507 R .bool .def_touch_exploration_enabled );
1508+
1509+ loadBooleanSetting (stmt , Settings .Secure .ACCESSIBILITY_SPEAK_PASSWORD ,
1510+ R .bool .def_accessibility_speak_password );
14921511 } finally {
14931512 if (stmt != null ) stmt .close ();
14941513 }
0 commit comments