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>
This commit is contained in:
AdrianDC 2015-11-11 19:19:34 +01:00
parent b59538ccd0
commit a63e78ba92
4 changed files with 26 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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);
}
/**