OSDN Git Service

Fix bug 1982892 - batteryservice turns off device even while plugged in
authorJoe Onorato <joeo@android.com>
Wed, 29 Jul 2009 01:20:08 +0000 (18:20 -0700)
committerJoe Onorato <joeo@android.com>
Thu, 30 Jul 2009 15:04:53 +0000 (08:04 -0700)
Also, make the battery service do it, not some keyguard thing.

phone/com/android/internal/policy/impl/KeyguardUpdateMonitor.java

index cd21427..44e893b 100644 (file)
@@ -35,7 +35,6 @@ import static android.provider.Telephony.Intents.EXTRA_SHOW_SPN;
 import static android.provider.Telephony.Intents.EXTRA_SPN;
 import static android.provider.Telephony.Intents.SPN_STRINGS_UPDATED_ACTION;
 
-import com.android.internal.app.ShutdownThread;
 import com.android.internal.telephony.IccCard;
 import com.android.internal.telephony.TelephonyIntents;
 import android.util.Log;
@@ -295,13 +294,6 @@ public class KeyguardUpdateMonitor {
                         shouldShowBatteryInfo(), pluggedIn, batteryLevel);
             }
         }
-
-        // shut down gracefully if our battery is critically low and we are not powered
-        if (batteryLevel == 0 &&
-                pluggedInStatus != BATTERY_STATUS_CHARGING &&
-                pluggedInStatus != BATTERY_STATUS_UNKNOWN) {
-            ShutdownThread.shutdown(mContext, false);
-        }
     }
 
     /**