summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-03-02 13:00:17 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-03-02 13:00:17 -0800
commit98625cb45fb662cb056d4cce4108d9a0fd8e5c83 (patch)
treea46af559e378200d6b1f622712411ece39dd6389
parent888b24a9d219fcf6739de1953e55eebd2cbed807 (diff)
parent90ad1c5231946f86d4a2c6e02a72983fb1339242 (diff)
downloadbase-98625cb45fb662cb056d4cce4108d9a0fd8e5c83.tar.gz
Merge "Fix 2447470: always update the battery status when it's below the threshold."
-rw-r--r--phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
index b7187a4..b7bb184 100644
--- a/phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
+++ b/phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java
@@ -385,14 +385,8 @@ public class KeyguardUpdateMonitor {
}
if (!pluggedIn) {
- // not plugged in and going below threshold
- if (batteryLevel < LOW_BATTERY_THRESHOLD
- && mBatteryLevel >= LOW_BATTERY_THRESHOLD) {
- return true;
- }
- // not plugged in and going above threshold (sounds impossible, but, meh...)
- if (mBatteryLevel < LOW_BATTERY_THRESHOLD
- && batteryLevel >= LOW_BATTERY_THRESHOLD) {
+ // not plugged in and below threshold
+ if (batteryLevel < LOW_BATTERY_THRESHOLD && batteryLevel != mBatteryLevel) {
return true;
}
}