Merge "Pulled out part of onScreenTurnedOn() into show() function"

This commit is contained in:
Brian Colonna
2011-09-28 16:29:48 -07:00
committed by Android (Google) Code Review
3 changed files with 16 additions and 6 deletions

View File

@@ -98,6 +98,11 @@ public abstract class KeyguardViewBase extends FrameLayout {
*/
abstract public void onScreenTurnedOn();
/**
* Called when the view needs to be shown.
*/
abstract public void show();
/**
* Called when a key has woken the device to give us a chance to adjust our
* state according the the key. We are responsible for waking the device

View File

@@ -167,7 +167,7 @@ public class KeyguardViewManager implements KeyguardWindowController {
mKeyguardHost.addView(mKeyguardView, lp);
if (mScreenOn) {
mKeyguardView.onScreenTurnedOn();
mKeyguardView.show();
}
}

View File

@@ -512,11 +512,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
@Override
public void onScreenTurnedOn() {
mScreenOn = true;
if (mMode == Mode.LockScreen) {
((KeyguardScreen) mLockScreen).onResume();
} else {
((KeyguardScreen) mUnlockScreen).onResume();
}
show();
// When screen is turned on, need to bind to FaceLock service if we are using FaceLock
// But only if not dealing with a call
@@ -527,6 +523,15 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
}
}
@Override
public void show() {
if (mMode == Mode.LockScreen) {
((KeyguardScreen) mLockScreen).onResume();
} else {
((KeyguardScreen) mUnlockScreen).onResume();
}
}
private void recreateLockScreen() {
if (mLockScreen != null) {
((KeyguardScreen) mLockScreen).onPause();