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.
*/
private boolean mWentToSleep = false;
synchronized (this) {
if (DEBUG_LOCKSCREEN) logLockScreen("");
mWindowManager.keyguardWaitingForActivityDrawn();
- mKeyguardWaitingForDraw = true;
+ if (mLockScreenShown) {
+ mLockScreenShown = false;
+ comeOutOfSleepIfNeededLocked();
+ }
}
} finally {
Binder.restoreCallingIdentity(token);
}
public boolean isSleeping() {
- return mSleeping && !mKeyguardWaitingForDraw;
+ return mSleeping;
}
void goingToSleep() {
if (mWentToSleep && !mRunningVoice) {
if (!mSleeping) {
mSleeping = true;
- mKeyguardWaitingForDraw = false;
mStackSupervisor.goingToSleepLocked();
// Initialize the wake times of all processes.
try {
if (DEBUG_LOCKSCREEN) logLockScreen(" shown=" + shown);
mLockScreenShown = shown;
- mKeyguardWaitingForDraw = false;
comeOutOfSleepIfNeededLocked();
} finally {
Binder.restoreCallingIdentity(ident);