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

Commit b1cb6be0 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 1777

* changes:
  If battery status is unknown don't send BATTERY_LOW intent
parents 370331fb 47ee3bc7
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -271,6 +271,7 @@ class BatteryService extends Binder {
             * - is not plugged and battery level crosses the WARNING boundary (becomes < 15).
             * - is not plugged and battery level crosses the WARNING boundary (becomes < 15).
             */
             */
            final boolean sendBatteryLow = !plugged
            final boolean sendBatteryLow = !plugged
                && mBatteryStatus != BatteryManager.BATTERY_STATUS_UNKNOWN
                && mBatteryLevel < BATTERY_LEVEL_WARNING
                && mBatteryLevel < BATTERY_LEVEL_WARNING
                && (oldPlugged || mLastBatteryLevel >= BATTERY_LEVEL_WARNING);
                && (oldPlugged || mLastBatteryLevel >= BATTERY_LEVEL_WARNING);