diff options
author | AdrianDC <radian.dc@gmail.com> | 2015-11-11 19:19:34 +0100 |
---|---|---|
committer | AdrianDC <radian.dc@gmail.com> | 2015-11-13 14:13:09 +0100 |
commit | a63e78ba9288efe237070e7e28aeb5750cd275ed (patch) | |
tree | 46bb2af9528299d8a34008ec096b3fcd3ea17972 | |
parent | b59538ccd074265679d9f662ce7f0965c5d03496 (diff) | |
download | vendor_cmsdk-a63e78ba9288efe237070e7e28aeb5750cd275ed.zip vendor_cmsdk-a63e78ba9288efe237070e7e28aeb5750cd275ed.tar.gz vendor_cmsdk-a63e78ba9288efe237070e7e28aeb5750cd275ed.tar.bz2 |
cmsdk: Move Notification LEDs settings to CMSettings
* Lights with Screen On
* LEDs Brightness
* Multiple LEDs
Change-Id: I8c3f3cae53c834d1d2798d9dece00e3253ccb1db
Signed-off-by: AdrianDC <radian.dc@gmail.com>
-rw-r--r-- | cm/res/res/values/config.xml | 8 | ||||
-rw-r--r-- | cm/res/res/values/symbols.xml | 4 | ||||
-rw-r--r-- | packages/CMSettingsProvider/res/values/defaults.xml | 8 | ||||
-rw-r--r-- | packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java | 6 |
4 files changed, 26 insertions, 0 deletions
diff --git a/cm/res/res/values/config.xml b/cm/res/res/values/config.xml index e655322..376327a 100644 --- a/cm/res/res/values/config.xml +++ b/cm/res/res/values/config.xml @@ -55,4 +55,12 @@ <integer name="config_dayColorTemperature">6500</integer> <integer name="config_nightColorTemperature">4500</integer> <integer name="config_outdoorAmbientLux">9000</integer> + + <!-- Is the notification LED brightness adjustable ? + Used to decide if the user can set LED brightness --> + <bool name="config_adjustableNotificationLedBrightness">false</bool> + + <!-- Does the device have multiple LEDs ? + Used to decide if the user can change the multiple LEDs settings --> + <bool name="config_multipleNotificationLeds">false</bool> </resources> diff --git a/cm/res/res/values/symbols.xml b/cm/res/res/values/symbols.xml index e8a61a6..cf1336b 100644 --- a/cm/res/res/values/symbols.xml +++ b/cm/res/res/values/symbols.xml @@ -69,4 +69,8 @@ <java-symbol type="integer" name="config_dayColorTemperature" /> <java-symbol type="integer" name="config_nightColorTemperature" /> <java-symbol type="integer" name="config_outdoorAmbientLux" /> + + <!-- Notification and battery light --> + <java-symbol type="bool" name="config_adjustableNotificationLedBrightness" /> + <java-symbol type="bool" name="config_multipleNotificationLeds" /> </resources> diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml index b9b0601..c15fa22 100644 --- a/packages/CMSettingsProvider/res/values/defaults.xml +++ b/packages/CMSettingsProvider/res/values/defaults.xml @@ -62,4 +62,12 @@ <!-- Default for CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE --> <string name="def_power_notifications_ringtone" translatable="false">content://settings/system/notification_sound</string> + + <!-- Default value for the notification LEDs brightness + on devices equiped with configurable LED controller --> + <integer name="def_notification_brightness_level">255</integer> + + <!-- Default value for whether or not to use multiple notification LEDs + on devices equiped with more than one LED --> + <bool name="def_notification_multiple_leds">false</bool> </resources>
\ No newline at end of file diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java index 97b9c29..9229c7a 100644 --- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java +++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java @@ -240,6 +240,12 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{ loadStringSetting(db, CMTableNames.TABLE_GLOBAL, CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE, R.string.def_power_notifications_ringtone); + + loadIntegerSetting(db, CMTableNames.TABLE_SYSTEM, CMSettings.System.NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL, + R.integer.def_notification_brightness_level); + + loadBooleanSetting(db, CMTableNames.TABLE_SYSTEM, CMSettings.System.NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE, + R.bool.def_notification_multiple_leds); } /** |