diff options
author | Mike Lockwood <lockwood@android.com> | 2011-10-20 13:58:26 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2012-02-10 10:51:23 -0800 |
commit | 4b797dd8c1d059510b12957acc3bd0b236308bb3 (patch) | |
tree | c8ea6dc6371d7744ae27127c595969135d3c210f /packages/SettingsProvider | |
parent | d3622e9e490191670d3dc7fa52b60e1efd575011 (diff) | |
download | frameworks_base-4b797dd8c1d059510b12957acc3bd0b236308bb3.zip frameworks_base-4b797dd8c1d059510b12957acc3bd0b236308bb3.tar.gz frameworks_base-4b797dd8c1d059510b12957acc3bd0b236308bb3.tar.bz2 |
Allow overriding default STAY_ON_WHILE_PLUGGED_IN setting value in an overlay
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/res/values/defaults.xml | 4 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 4ea2c31..6081d6f 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -141,4 +141,8 @@ <bool name="def_dtmf_tones_enabled">true</bool> <!-- Default for UI touch sounds enabled --> <bool name="def_sound_effects_enabled">true</bool> + + <!-- Development settings --> + <bool name="def_stay_on_while_plugged_in">false</bool> + </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 6e9ea52..d08a03f 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -1352,7 +1352,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.System.DIM_SCREEN, R.bool.def_dim_screen); loadSetting(stmt, Settings.System.STAY_ON_WHILE_PLUGGED_IN, - "1".equals(SystemProperties.get("ro.kernel.qemu")) ? 1 : 0); + ("1".equals(SystemProperties.get("ro.kernel.qemu")) || + mContext.getResources().getBoolean(R.bool.def_stay_on_while_plugged_in)) + ? 1 : 0); loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT, R.integer.def_screen_off_timeout); |