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

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

Merge "Moved FaceLock bind/unbind calls inside of null check"

parents 99f6ecc2 15ea55a6
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -197,22 +197,22 @@ public class KeyguardViewManager implements KeyguardWindowController {
        mScreenOn = false;
        if (mKeyguardView != null) {
            mKeyguardView.onScreenTurnedOff();
        }

        // When screen is turned off, need to unbind from FaceLock service if we are using FaceLock
            // When screen is turned off, need to unbind from FaceLock service if using FaceLock
            mKeyguardView.stopAndUnbindFromFaceLock();
        }
    }

    public synchronized void onScreenTurnedOn() {
        if (DEBUG) Log.d(TAG, "onScreenTurnedOn()");
        mScreenOn = true;
        if (mKeyguardView != null) {
            mKeyguardView.onScreenTurnedOn();
        }

            // When screen is turned on, need to bind to FaceLock service if we are using FaceLock
            mKeyguardView.bindToFaceLock();
        }
    }

    public synchronized void verifyUnlock() {
        if (DEBUG) Log.d(TAG, "verifyUnlock()");
@@ -248,9 +248,11 @@ public class KeyguardViewManager implements KeyguardWindowController {
    public synchronized void hide() {
        if (DEBUG) Log.d(TAG, "hide()");

        if (mKeyguardView != null) {
            // When view is hidden, need to unbind from FaceLock service if we are using FaceLock
            // e.g., when device becomes unlocked
            mKeyguardView.stopAndUnbindFromFaceLock();
        }

        if (mKeyguardHost != null) {
            mKeyguardHost.setVisibility(View.GONE);