Loading services/core/java/com/android/server/power/ShutdownThread.java +3 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ public final class ShutdownThread extends Thread { // Indicates whether we are rebooting into safe mode public static final String REBOOT_SAFEMODE_PROPERTY = "persist.sys.safemode"; // Indicates whether we should stay in safe mode until ro.build.date.utc is newer than this public static final String AUDIT_SAFEMODE_PROPERTY = "persist.sys.audit_safemode"; // static instance of this thread private static final ShutdownThread sInstance = new ShutdownThread(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +18 −2 Original line number Diff line number Diff line Loading @@ -305,6 +305,8 @@ public class WindowManagerService extends IWindowManager.Stub private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; private static final String PROPERTY_BUILD_DATE_UTC = "ro.build.date.utc"; final private KeyguardDisableHandler mKeyguardDisableHandler; final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { Loading Loading @@ -7629,8 +7631,22 @@ public class WindowManagerService extends IWindowManager.Stub || volumeDownState > 0; try { if (SystemProperties.getInt(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, 0) != 0) { int auditSafeMode = SystemProperties.getInt(ShutdownThread.AUDIT_SAFEMODE_PROPERTY, 0); if (auditSafeMode == 0) { mSafeMode = true; SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); } else { // stay in safe mode until we have updated to a newer build int buildDate = SystemProperties.getInt(PROPERTY_BUILD_DATE_UTC, 0); if (auditSafeMode >= buildDate) { mSafeMode = true; } else { SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); SystemProperties.set(ShutdownThread.AUDIT_SAFEMODE_PROPERTY, ""); } } } } catch (IllegalArgumentException e) { } Loading Loading
services/core/java/com/android/server/power/ShutdownThread.java +3 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ public final class ShutdownThread extends Thread { // Indicates whether we are rebooting into safe mode public static final String REBOOT_SAFEMODE_PROPERTY = "persist.sys.safemode"; // Indicates whether we should stay in safe mode until ro.build.date.utc is newer than this public static final String AUDIT_SAFEMODE_PROPERTY = "persist.sys.audit_safemode"; // static instance of this thread private static final ShutdownThread sInstance = new ShutdownThread(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +18 −2 Original line number Diff line number Diff line Loading @@ -305,6 +305,8 @@ public class WindowManagerService extends IWindowManager.Stub private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; private static final String PROPERTY_BUILD_DATE_UTC = "ro.build.date.utc"; final private KeyguardDisableHandler mKeyguardDisableHandler; final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { Loading Loading @@ -7629,8 +7631,22 @@ public class WindowManagerService extends IWindowManager.Stub || volumeDownState > 0; try { if (SystemProperties.getInt(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, 0) != 0) { int auditSafeMode = SystemProperties.getInt(ShutdownThread.AUDIT_SAFEMODE_PROPERTY, 0); if (auditSafeMode == 0) { mSafeMode = true; SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); } else { // stay in safe mode until we have updated to a newer build int buildDate = SystemProperties.getInt(PROPERTY_BUILD_DATE_UTC, 0); if (auditSafeMode >= buildDate) { mSafeMode = true; } else { SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); SystemProperties.set(ShutdownThread.AUDIT_SAFEMODE_PROPERTY, ""); } } } } catch (IllegalArgumentException e) { } Loading