Loading packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +18 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,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 = 60; private static final int DATABASE_VERSION = 61; private Context mContext; Loading Loading @@ -792,6 +792,23 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 60; } if (upgradeVersion == 60) { // Increase screen timeout for tablet db.beginTransaction(); SQLiteStatement stmt = null; try { stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)" + " VALUES(?,?);"); loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT, R.integer.def_screen_off_timeout); db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); } upgradeVersion = 61; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Loading Loading
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +18 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,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 = 60; private static final int DATABASE_VERSION = 61; private Context mContext; Loading Loading @@ -792,6 +792,23 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 60; } if (upgradeVersion == 60) { // Increase screen timeout for tablet db.beginTransaction(); SQLiteStatement stmt = null; try { stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)" + " VALUES(?,?);"); loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT, R.integer.def_screen_off_timeout); db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); } upgradeVersion = 61; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Loading