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

Commit ce521ee7 authored by Diogo Ferreira's avatar Diogo Ferreira Committed by Gerrit Code Review
Browse files

services: battery: Don't blink with an hvdcp charger

Quick charging doesn't really turn the device into a ticking time bomb
so there is no use in frantically blinking the led while charging.

This is a partial revert of the lights changes in a qualcomm commit
(ec43b6d8).

Change-Id: I42fdaa4a0af1bfa96c598b4209cbe9936d0de35d
Ticket: MARMITE-441
parent 2d6cf0cd
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -1122,16 +1122,10 @@ public final class BatteryService extends SystemService {
                if (status == BatteryManager.BATTERY_STATUS_FULL || level >= 90) {
                    // Battery is full or charging and nearly full
                    mBatteryLight.setColor(mBatteryFullARGB);
                } else {
                    if (isHvdcpPresent()) {
                        // Blinking orange if HVDCP charger
                        mBatteryLight.setFlashing(mBatteryMediumARGB, Light.LIGHT_FLASH_TIMED,
                                mBatteryLedOn, mBatteryLedOn);
                } else {
                    // Battery is charging and halfway full
                    mBatteryLight.setColor(mBatteryMediumARGB);
                }
                }
            } else {
                // No lights if not charging and not low
                mBatteryLight.turnOff();