Skip to content

Commit 4f5d151

Browse files
author
Craig Mautner
committed
Make sure onScreenTurnedOn is called at power on.
KeyguardViewMediator.onScreenTurnedOn is not called if the device is booted into the power-on state. In this case mScreenOn remains false and the lockscreen will always appear after outgoing calls. This fix ensures that onScreenTurnedOn is called when the device is powered up in the on state. Fixes bug 6709173. Change-Id: I7557d8f002307b9125bc53b13bc3cb4c5c9b2758
1 parent d5353b4 commit 4f5d151

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ public void onScreenTurnedOn(KeyguardViewManager.ShowListener showListener) {
442442
mScreenOn = true;
443443
mDelayedShowingSequence++;
444444
if (DEBUG) Log.d(TAG, "onScreenTurnedOn, seq = " + mDelayedShowingSequence);
445-
notifyScreenOnLocked(showListener);
445+
if (showListener != null) {
446+
notifyScreenOnLocked(showListener);
447+
}
446448
}
447449
}
448450

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3608,6 +3608,10 @@ public void screenTurningOn(final ScreenOnListener screenOnListener) {
36083608
});
36093609
}
36103610
} else {
3611+
if (mKeyguardMediator != null) {
3612+
// Must set mScreenOn = true.
3613+
mKeyguardMediator.onScreenTurnedOn(null);
3614+
}
36113615
synchronized (mLock) {
36123616
mScreenOnFully = true;
36133617
}

0 commit comments

Comments
 (0)