Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab561f5b authored by Narayan Kamath's avatar Narayan Kamath Committed by Gerrit Code Review
Browse files

Merge "Don't make isSafeMode a field on the Zygote class."

parents 91bbb75c d1a8d9f4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -824,7 +824,7 @@ class ServerThread {
        if (safeMode) {
            ActivityManagerService.self().enterSafeMode();
            // Post the safe mode state in the Zygote class
            Zygote.systemInSafeMode = true;
            SystemServer.inSafeMode = true;
            // Disable the JIT for the system_server process
            VMRuntime.getRuntime().disableJitCompilation();
        } else {
@@ -1117,6 +1117,11 @@ public class SystemServer {
    // give any timezone code room without going into negative time.
    private static final long EARLIEST_SUPPORTED_TIME = 86400 * 1000;

   /**
    * When set, all subsequent apps will be launched in safe mode.
    */
    public static boolean inSafeMode;

    /**
     * Called to initialize native system services.
     */
+1 −1
Original line number Diff line number Diff line
@@ -2768,7 +2768,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            // Run the app in safe mode if its manifest requests so or the
            // system is booted in safe mode.
            if ((app.info.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0 ||
                Zygote.systemInSafeMode == true) {
                SystemServer.inSafeMode == true) {
                debugFlags |= Zygote.DEBUG_ENABLE_SAFEMODE;
            }
            if ("1".equals(SystemProperties.get("debug.checkjni"))) {