Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d90172e0 authored by Brian Colonna's avatar Brian Colonna Committed by Android (Google) Code Review
Browse files

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

parents 0044a15e 4284e9d1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ public class KeyguardViewManager implements KeyguardWindowController {
            mKeyguardHost.addView(mKeyguardView, lp);

            if (mScreenOn) {
                mKeyguardView.onScreenTurnedOn();
                mKeyguardView.show();
            }
        }

+10 −5
Original line number Diff line number Diff line
@@ -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();