summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/BatteryService.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index fd04811..839ba6e 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -1050,8 +1050,8 @@ public final class BatteryService extends SystemService {
mBatteryLedOff = context.getResources().getInteger(
com.android.internal.R.integer.config_notificationsBatteryLedOff);
- // Does a device have a segmented battery LED? In this case, we send the level
- // in the lower 8 bits of the color and let the HAL sort it out.
+ // Does the Device have segmented battery LED support? In this case, we send the level
+ // in the alpha channel of the color and let the HAL sort it out.
mUseSegmentedBatteryLed = context.getResources().getBoolean(
org.cyanogenmod.platform.internal.R.bool.config_useSegmentedBatteryLed);
}
@@ -1095,14 +1095,12 @@ public final class BatteryService extends SystemService {
final int level = mBatteryProps.batteryLevel;
final int status = mBatteryProps.batteryStatus;
+ mNotificationLedBrightnessLevel = mUseSegmentedBatteryLed ? level :
+ LIGHT_BRIGHTNESS_MAXIMUM;
if (!mLightEnabled) {
// No lights if explicitly disabled
mBatteryLight.turnOff();
- } else if (mUseSegmentedBatteryLed &&
- (status == BatteryManager.BATTERY_STATUS_CHARGING
- || status == BatteryManager.BATTERY_STATUS_FULL)) {
- mBatteryLight.setColor(level);
} else if (level < mLowBatteryWarningLevel) {
mBatteryLight.setModes(mNotificationLedBrightnessLevel,
mMultipleLedsEnabled);