diff options
author | Ricardo Cerqueira <android@cerqueira.org> | 2016-11-10 12:15:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-11-10 04:30:11 -0800 |
commit | c15736bb1034f8aca5429ca336a2ab7126fe7a57 (patch) | |
tree | 4c8babb1a95b16dfffc1964e549f5313c8c40446 /core/res | |
parent | c7d2fb722fcf528e465bc3274bbb436edc9aeb2e (diff) | |
download | frameworks_base-c15736bb1034f8aca5429ca336a2ab7126fe7a57.zip frameworks_base-c15736bb1034f8aca5429ca336a2ab7126fe7a57.tar.gz frameworks_base-c15736bb1034f8aca5429ca336a2ab7126fe7a57.tar.bz2 |
NotificationManager: Concentrate LED light capabilities at a single location
We had(have) a bunch of individual boolean toggles for various LED behaviors
and combinations, which end up getting used as a similarly sprawling bunch
of getResource() calls across various locations. And they keep piling up...
So... create a new overlayable array of LED capabilities (config_deviceLightCapabilities)
where we can throw everything (and expand in the future). Also, create a
helper to abstract usage of the old (multi-resource) and new (single resource
array) formats to avoid breaking any deployed devices.
Change-Id: I7d627914b058861048071fc15776031c4152157f
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/res/values/cm_symbols.xml | 3 | ||||
-rw-r--r-- | core/res/res/values/config.xml | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/core/res/res/values/cm_symbols.xml b/core/res/res/values/cm_symbols.xml index 81f33cb..a56e5ac 100644 --- a/core/res/res/values/cm_symbols.xml +++ b/core/res/res/values/cm_symbols.xml @@ -145,4 +145,7 @@ <!--Exposed style for power menu --> <java-symbol type="style" name="Theme.Power.Dialog" /> + + <!-- On-device lights (LED) capabilities --> + <java-symbol type="array" name="config_deviceLightCapabilities" /> </resources> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 79bf24e..8b49227 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2575,4 +2575,27 @@ <!-- Whether to persist the notification for when a usb drive device is plugged in --> <bool name="config_persistUsbDriveNotification">false</bool> + + <!-- What can the LEDs on this device do? If defined, this overrides all of the + older settings: + + com.android.internal.R.bool.config_multiColorNotificationLed + com.android.internal.R.bool.config_multiColorBatteryLed + org.cyanogenmod.platform.internal.R.bool.config_multipleNotificationLeds + com.android.internal.R.bool.config_ledCanPulse + org.cyanogenmod.platform.internal.R.bool.config_useSegmentedBatteryLed + org.cyanogenmod.platform.internal.R.bool.config_adjustableNotificationLedBrightness + + Use the following values from NotificationManager: + LIGHTS_RGB_NOTIFICATION = 0 + LIGHTS_RGB_BATTERY = 1 + LIGHTS_MULTIPLE_LED = 2 + LIGHTS_LED_PULSE = 3 + LIGHTS_SEGMENTED_BATTERY_LIGHTS = 4 + LIGHTS_ADJUSTABLE_NOTIFICATION_BRIGHTNESS = 5 + --> + + <integer-array translatable="false" name="config_deviceLightCapabilities"> + </integer-array> + </resources> |