summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-11-05 11:22:21 -0700
committerAmith Yamasani <yamasani@google.com>2010-11-05 11:22:21 -0700
commit0038931043f8edf9c32645e5caf96f217cef01de (patch)
treeb68ee5105459114b2b11a68904ae454378a1a354 /packages
parentf3e5fcc91734d8e39b396f1b70b9903a6b3dd2c0 (diff)
downloadframeworks_base-0038931043f8edf9c32645e5caf96f217cef01de.zip
frameworks_base-0038931043f8edf9c32645e5caf96f217cef01de.tar.gz
frameworks_base-0038931043f8edf9c32645e5caf96f217cef01de.tar.bz2
Adjust default screen timeout.
Bug: 3165933
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 593edc8..6c84afd 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -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;
@@ -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) {