@memory Android日志会有 I/WindowManager( 2046): SAFE MODE ENABLED (menu=0 s=0 dpad=-1 trackball=-1)报错,然后根据括号内容的值提示,就能找到原因。
强硬去除安全模式的修改,可做参考
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
index bdb5d3f0..c11d555c 100644
--- a/services/core/java/com/android/server/power/ShutdownThread.java
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
@@ -255,7 +255,7 @@ public final class ShutdownThread extends Thread {
}
mReboot = true;
- mRebootSafeMode = true;
+ mRebootSafeMode = false;
mRebootHasProgressBar = false;
mReason = null;
shutdownInner(context, confirm);
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index d8bb8d86..8193de92 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -4500,7 +4500,7 @@ public class WindowManagerService extends IWindowManager.Stub
Log.i(TAG_WM, "SAFE MODE not enabled");
}
mPolicy.setSafeMode(mSafeMode);
- return mSafeMode;
+ return false;
}
public void displayReady() {