diff options
author | Adnan Begovic <adnan@cyngn.com> | 2016-02-15 15:11:29 -0800 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2016-02-17 14:11:08 -0800 |
commit | c8e4f0066f7a664488a3dc2841fa4a4183e3a48e (patch) | |
tree | 02d1d5056e7bafc8297bf2b599944a287b608051 /packages | |
parent | 182b972c0b059d3f31dbce3a164da3b42378deb0 (diff) | |
download | vendor_cmsdk-c8e4f0066f7a664488a3dc2841fa4a4183e3a48e.zip vendor_cmsdk-c8e4f0066f7a664488a3dc2841fa4a4183e3a48e.tar.gz vendor_cmsdk-c8e4f0066f7a664488a3dc2841fa4a4183e3a48e.tar.bz2 |
CMSettingsProvider: Define battery style default.
Change-Id: Ic0cea75783ee5a0a7be3d0a24e57588ca177169a
TICKET: CYNGNOS-2041
Diffstat (limited to 'packages')
3 files changed, 16 insertions, 0 deletions
diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml index 4957641..5d590ad 100644 --- a/packages/CMSettingsProvider/res/values/defaults.xml +++ b/packages/CMSettingsProvider/res/values/defaults.xml @@ -51,6 +51,16 @@ <!-- Default for CMSettings.Secure.STATS_COLLECTION --> <bool name="def_stats_collection">false</bool> + <!-- Default for CMSettings.System.STATUS_BAR_BATTERY_STYLE + * 0: Display the battery as icon in portrait mode + * 2: Display the battery as a circle + * 4: Hide the battery status information + * 5: Display the battery as icon in landscape mode + * 6: Display the battery as plain text + * default: 2 + --> + <integer name="def_battery_style">2</integer> + <!-- Default for CMSettings.Secure.QS_USE_MAIN_TILES --> <bool name="def_sysui_qs_main_tiles">true</bool> diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java index 65ff3c0..98064af 100644 --- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java +++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java @@ -296,6 +296,9 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{ loadBooleanSetting(stmt, CMSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION, R.bool.def_swap_volume_keys_on_rotation); + loadIntegerSetting(stmt, CMSettings.System.STATUS_BAR_BATTERY_STYLE, + R.integer.def_battery_style); + if (mContext.getResources().getBoolean(R.bool.def_notification_pulse_custom_enable)) { loadStringSetting(stmt, CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES, R.string.def_notification_pulse_custom_value); diff --git a/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java b/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java index b4fc655..a2c4269 100644 --- a/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java +++ b/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java @@ -73,6 +73,9 @@ public class CMSettingsProviderDefaultsTest extends AndroidTestCase { SYSTEM_SETTINGS_DEFAULTS.add(new Setting( CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES, "R.string.def_notification_pulse_custom_value")); + SYSTEM_SETTINGS_DEFAULTS.add(new Setting( + CMSettings.System.STATUS_BAR_BATTERY_STYLE, + "R.integer.def_battery_style")); } //SECURE |