Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 445f4308 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

NotificationManagerService: Only blink red battery low LED when not charging.



Change-Id: Ie5836ae99d4ca19d9d062e7c78c8b40cd8d6c29d
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 71119048
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -957,8 +957,15 @@ class NotificationManagerService extends INotificationManager.Stub
    {
        // Battery low always shows, other states only show if charging.
        if (mBatteryLow) {
            mHardware.setLightFlashing_UNCHECKED(HardwareService.LIGHT_ID_BATTERY, BATTERY_LOW_ARGB,
                    HardwareService.LIGHT_FLASH_TIMED, BATTERY_BLINK_ON, BATTERY_BLINK_OFF);
            if (mBatteryCharging) {
                mHardware.setLightColor_UNCHECKED(HardwareService.LIGHT_ID_BATTERY,
                    BATTERY_LOW_ARGB);
            } else {
                // Flash when battery is low and not charging
                mHardware.setLightFlashing_UNCHECKED(HardwareService.LIGHT_ID_BATTERY,
                    BATTERY_LOW_ARGB, HardwareService.LIGHT_FLASH_TIMED,
                    BATTERY_BLINK_ON, BATTERY_BLINK_OFF);
            }
        } else if (mBatteryCharging) {
            if (mBatteryFull) {
                mHardware.setLightColor_UNCHECKED(HardwareService.LIGHT_ID_BATTERY,