Skip to content

Commit d90172e

Browse files
Brian ColonnaAndroid (Google) Code Review
authored andcommitted
Merge "Pulled out part of onScreenTurnedOn() into show() function"
2 parents 0044a15 + 4284e9d commit d90172e

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ public KeyguardViewCallback getCallback() {
9898
*/
9999
abstract public void onScreenTurnedOn();
100100

101+
/**
102+
* Called when the view needs to be shown.
103+
*/
104+
abstract public void show();
105+
101106
/**
102107
* Called when a key has woken the device to give us a chance to adjust our
103108
* state according the the key. We are responsible for waking the device

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public synchronized void show() {
167167
mKeyguardHost.addView(mKeyguardView, lp);
168168

169169
if (mScreenOn) {
170-
mKeyguardView.onScreenTurnedOn();
170+
mKeyguardView.show();
171171
}
172172
}
173173

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,7 @@ public void onScreenTurnedOff() {
512512
@Override
513513
public void onScreenTurnedOn() {
514514
mScreenOn = true;
515-
if (mMode == Mode.LockScreen) {
516-
((KeyguardScreen) mLockScreen).onResume();
517-
} else {
518-
((KeyguardScreen) mUnlockScreen).onResume();
519-
}
515+
show();
520516

521517
// When screen is turned on, need to bind to FaceLock service if we are using FaceLock
522518
// But only if not dealing with a call
@@ -527,6 +523,15 @@ public void onScreenTurnedOn() {
527523
}
528524
}
529525

526+
@Override
527+
public void show() {
528+
if (mMode == Mode.LockScreen) {
529+
((KeyguardScreen) mLockScreen).onResume();
530+
} else {
531+
((KeyguardScreen) mUnlockScreen).onResume();
532+
}
533+
}
534+
530535
private void recreateLockScreen() {
531536
if (mLockScreen != null) {
532537
((KeyguardScreen) mLockScreen).onPause();

0 commit comments

Comments
 (0)