If battery status is unknown don't send BATTERY_LOW intent
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
This commit is contained in:
@ -271,6 +271,7 @@ class BatteryService extends Binder {
|
||||
* - is not plugged and battery level crosses the WARNING boundary (becomes < 15).
|
||||
*/
|
||||
final boolean sendBatteryLow = !plugged
|
||||
&& mBatteryStatus != BatteryManager.BATTERY_STATUS_UNKNOWN
|
||||
&& mBatteryLevel < BATTERY_LEVEL_WARNING
|
||||
&& (oldPlugged || mLastBatteryLevel >= BATTERY_LEVEL_WARNING);
|
||||
|
||||
|
Reference in New Issue
Block a user