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:
Rebecca Schultz Zavin
2009-05-14 22:34:04 -07:00
parent 55051ebdd1
commit 47ee3bc78e

View File

@ -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);