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

Commit ea19b33a authored by Michael W's avatar Michael W
Browse files

Core: Battery warning levels are inclusive, not exclusive

* Instead of checking for the current level to be smaller than the warning
  level, already react when the warning level is reached
* Simply change of '<' to '<='

Bugbash-1100

Change-Id: Ib35b154b6117f7e26b4a3a5aee9254dda3adda12
parent 90c2139b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -982,7 +982,7 @@ public final class BatteryService extends SystemService {
            if (!mLightEnabled) {
                // No lights if explicitly disabled
                mBatteryLight.turnOff();
            } else if (level < mLowBatteryWarningLevel) {
            } else if (level <= mLowBatteryWarningLevel) {
                mBatteryLight.setModes(mNotificationLedBrightnessLevel,
                        mMultipleLedsEnabled);
                if (status == BatteryManager.BATTERY_STATUS_CHARGING) {