File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
policy/src/com/android/internal/policy/impl Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments