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

Commit 73148c29 authored by Matt Pietal's avatar Matt Pietal
Browse files

KeyguardViewMediator - Remove unused code

mExitSecureCallback no longer appears to be used. Take it out.

Bug: 195430376
Test: atest KeyguardViewMediatorTest
Change-Id: I40acd41d0f427b1f1c94c5bbeef9645872c0b19e
parent 42faeabc
Loading
Loading
Loading
Loading
+15 −72
Original line number Diff line number Diff line
@@ -335,12 +335,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
     */
    private int mDelayedProfileShowingSequence;

    /**
     * If the user has disabled the keyguard, then requests to exit, this is
     * how we'll ultimately let them know whether it was successful.  We use this
     * var being non-null as an indicator that there is an in progress request.
     */
    private IKeyguardExitCallback mExitSecureCallback;
    private final DismissCallbackRegistry mDismissCallbackRegistry;

    // the properties of the keyguard
@@ -1321,18 +1315,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                            || !mLockPatternUtils.isSecure(currentUser);
            long timeout = getLockTimeout(KeyguardUpdateMonitor.getCurrentUser());
            mLockLater = false;
            if (mExitSecureCallback != null) {
                if (DEBUG) Log.d(TAG, "pending exit secure callback cancelled");
                try {
                    mExitSecureCallback.onKeyguardExitResult(false);
                } catch (RemoteException e) {
                    Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                }
                mExitSecureCallback = null;
                if (!mExternallyEnabled) {
                    hideLocked();
                }
            } else if (mShowing && !mKeyguardStateController.isKeyguardGoingAway()) {
            if (mShowing && !mKeyguardStateController.isKeyguardGoingAway()) {
                // If we are going to sleep but the keyguard is showing (and will continue to be
                // showing, not in the process of going away) then reset its state. Otherwise, let
                // this fall through and explicitly re-lock the keyguard.
@@ -1651,13 +1634,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
            mExternallyEnabled = enabled;

            if (!enabled && mShowing) {
                if (mExitSecureCallback != null) {
                    if (DEBUG) Log.d(TAG, "in process of verifyUnlock request, ignoring");
                    // we're in the process of handling a request to verify the user
                    // can get past the keyguard. ignore extraneous requests to disable / re-enable
                    return;
                }

                // hiding keyguard that is showing, remember to reshow later
                if (DEBUG) Log.d(TAG, "remembering to reshow, hiding keyguard, "
                        + "disabling status bar expansion");
@@ -1671,23 +1647,14 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                mNeedToReshowWhenReenabled = false;
                updateInputRestrictedLocked();

                if (mExitSecureCallback != null) {
                    if (DEBUG) Log.d(TAG, "onKeyguardExitResult(false), resetting");
                    try {
                        mExitSecureCallback.onKeyguardExitResult(false);
                    } catch (RemoteException e) {
                        Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                    }
                    mExitSecureCallback = null;
                    resetStateLocked();
                } else {
                showLocked(null);

                // block until we know the keyguard is done drawing (and post a message
                // to unblock us after a timeout, so we don't risk blocking too long
                // and causing an ANR).
                mWaitingUntilKeyguardVisible = true;
                    mHandler.sendEmptyMessageDelayed(KEYGUARD_DONE_DRAWING, KEYGUARD_DONE_DRAWING_TIMEOUT_MS);
                mHandler.sendEmptyMessageDelayed(KEYGUARD_DONE_DRAWING,
                        KEYGUARD_DONE_DRAWING_TIMEOUT_MS);
                if (DEBUG) Log.d(TAG, "waiting until mWaitingUntilKeyguardVisible is false");
                while (mWaitingUntilKeyguardVisible) {
                    try {
@@ -1700,7 +1667,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
            }
        }
    }
    }

    /**
     * @see android.app.KeyguardManager#exitKeyguardSecurely
@@ -1727,13 +1693,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                } catch (RemoteException e) {
                    Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                }
            } else if (mExitSecureCallback != null) {
                // already in progress with someone else
                try {
                    callback.onKeyguardExitResult(false);
                } catch (RemoteException e) {
                    Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                }
            } else if (!isSecure()) {

                // Keyguard is not secure, no need to do anything, and we don't need to reshow
@@ -2270,21 +2229,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
            return;
        }
        setPendingLock(false); // user may have authenticated during the screen off animation
        if (mExitSecureCallback != null) {
            try {
                mExitSecureCallback.onKeyguardExitResult(true /* authenciated */);
            } catch (RemoteException e) {
                Slog.w(TAG, "Failed to call onKeyguardExitResult()", e);
            }

            mExitSecureCallback = null;

            // after successfully exiting securely, no need to reshow
            // the keyguard when they've released the lock
            mExternallyEnabled = true;
            mNeedToReshowWhenReenabled = false;
            updateInputRestricted();
        }

        handleHide();
        mUpdateMonitor.clearBiometricRecognizedWhenKeyguardDone(currentUser);
@@ -3093,7 +3037,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
        pw.print("  mInputRestricted: "); pw.println(mInputRestricted);
        pw.print("  mOccluded: "); pw.println(mOccluded);
        pw.print("  mDelayedShowingSequence: "); pw.println(mDelayedShowingSequence);
        pw.print("  mExitSecureCallback: "); pw.println(mExitSecureCallback);
        pw.print("  mDeviceInteractive: "); pw.println(mDeviceInteractive);
        pw.print("  mGoingToSleep: "); pw.println(mGoingToSleep);
        pw.print("  mHiding: "); pw.println(mHiding);