Loading services/core/java/com/android/server/am/ActivityManagerService.java +12 −2 Original line number Diff line number Diff line Loading @@ -936,6 +936,13 @@ public final class ActivityManagerService extends ActivityManagerNative */ private boolean mRunningVoice = false; /** * Set while the keyguard is waiting for an activity to draw. * In this state, if we are sleeping, we allow Activities to launch * so that they can draw before Keyguard dismisses itself. */ private boolean mKeyguardWaitingForDraw = false; /** * State of external calls telling us if the device is asleep. */ Loading Loading @@ -6242,6 +6249,7 @@ public final class ActivityManagerService extends ActivityManagerNative synchronized (this) { if (DEBUG_LOCKSCREEN) logLockScreen(""); mWindowManager.keyguardWaitingForActivityDrawn(); mKeyguardWaitingForDraw = true; } } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -9935,11 +9943,11 @@ public final class ActivityManagerService extends ActivityManagerNative // Actually is sleeping or shutting down or whatever else in the future // is an inactive state. public boolean isSleepingOrShuttingDown() { return mSleeping || mShuttingDown; return isSleeping() || mShuttingDown; } public boolean isSleeping() { return mSleeping; return mSleeping && !mKeyguardWaitingForDraw; } void goingToSleep() { Loading @@ -9961,6 +9969,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (mWentToSleep && !mRunningVoice) { if (!mSleeping) { mSleeping = true; mKeyguardWaitingForDraw = false; mStackSupervisor.goingToSleepLocked(); // Initialize the wake times of all processes. Loading Loading @@ -10070,6 +10079,7 @@ public final class ActivityManagerService extends ActivityManagerNative try { if (DEBUG_LOCKSCREEN) logLockScreen(" shown=" + shown); mLockScreenShown = shown; mKeyguardWaitingForDraw = false; comeOutOfSleepIfNeededLocked(); } finally { Binder.restoreCallingIdentity(ident); Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +12 −2 Original line number Diff line number Diff line Loading @@ -936,6 +936,13 @@ public final class ActivityManagerService extends ActivityManagerNative */ private boolean mRunningVoice = false; /** * Set while the keyguard is waiting for an activity to draw. * In this state, if we are sleeping, we allow Activities to launch * so that they can draw before Keyguard dismisses itself. */ private boolean mKeyguardWaitingForDraw = false; /** * State of external calls telling us if the device is asleep. */ Loading Loading @@ -6242,6 +6249,7 @@ public final class ActivityManagerService extends ActivityManagerNative synchronized (this) { if (DEBUG_LOCKSCREEN) logLockScreen(""); mWindowManager.keyguardWaitingForActivityDrawn(); mKeyguardWaitingForDraw = true; } } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -9935,11 +9943,11 @@ public final class ActivityManagerService extends ActivityManagerNative // Actually is sleeping or shutting down or whatever else in the future // is an inactive state. public boolean isSleepingOrShuttingDown() { return mSleeping || mShuttingDown; return isSleeping() || mShuttingDown; } public boolean isSleeping() { return mSleeping; return mSleeping && !mKeyguardWaitingForDraw; } void goingToSleep() { Loading @@ -9961,6 +9969,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (mWentToSleep && !mRunningVoice) { if (!mSleeping) { mSleeping = true; mKeyguardWaitingForDraw = false; mStackSupervisor.goingToSleepLocked(); // Initialize the wake times of all processes. Loading Loading @@ -10070,6 +10079,7 @@ public final class ActivityManagerService extends ActivityManagerNative try { if (DEBUG_LOCKSCREEN) logLockScreen(" shown=" + shown); mLockScreenShown = shown; mKeyguardWaitingForDraw = false; comeOutOfSleepIfNeededLocked(); } finally { Binder.restoreCallingIdentity(ident); Loading