--- a/alps/frameworks/base/services/core/java/com/android/server/BatteryService.java
+++ b/alps/frameworks/base/services/core/java/com/android/server/BatteryService.java
@@ -384,7 +384,8 @@ public final class BatteryService extends SystemService {
private void shutdownIfNoPowerLocked() {
// shut down gracefully if our battery is critically low and we are not powered.
// wait until the system has booted before attempting to display the shutdown dialog.
- if (shouldShutdownLocked()) {
+ //if (shouldShutdownLocked()) {
+ if (mHealthInfo.batteryLevel == 0 && !isPoweredLocked(BatteryManager.BATTERY_PLUGGED_ANY)) {
mHandler.post(new Runnable() {
@Override
public void run() {
android11电量显示0%,不能及时关机延迟的问题
最新推荐文章于 2024-06-05 00:15:00 发布