Skip to content

Commit 5d88c14

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Ensure screen reader URL gets updated during ICS to JB update." into jb-dev
2 parents fcd7cf2 + 3a67eb3 commit 5d88c14

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 = 78;
66+
private static final int DATABASE_VERSION = 79;
6767

6868
private Context mContext;
6969

@@ -1054,6 +1054,23 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) {
10541054
upgradeVersion = 78;
10551055
}
10561056

1057+
if (upgradeVersion == 78) {
1058+
// The JavaScript based screen-reader URL changes in JellyBean.
1059+
db.beginTransaction();
1060+
SQLiteStatement stmt = null;
1061+
try {
1062+
stmt = db.compileStatement("INSERT OR REPLACE INTO secure(name,value)"
1063+
+ " VALUES(?,?);");
1064+
loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL,
1065+
R.string.def_accessibility_screen_reader_url);
1066+
db.setTransactionSuccessful();
1067+
} finally {
1068+
db.endTransaction();
1069+
if (stmt != null) stmt.close();
1070+
}
1071+
upgradeVersion = 79;
1072+
}
1073+
10571074
// *** Remember to update DATABASE_VERSION above!
10581075

10591076
if (upgradeVersion != currentVersion) {

0 commit comments

Comments
 (0)