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

Commit 80a6046e authored by Beverly's avatar Beverly
Browse files

Remove unused primaryAuth/strongAuth parameter

Bug: 268240415
Test: atest KeyguardSecurityContainerControllerTest KeyguardViewMediatorTest
Change-Id: Ibdb2dc3b08987f2397b15a9b85b4da15b2125e99
parent 3fcdcfdc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public interface KeyguardSecurityCallback {
    /**
     * Dismisses keyguard and go to unlocked state.
     */
    default void finish(boolean strongAuth, int targetUserId) {
    default void finish(int targetUserId) {
    }

    /**
+6 −8
Original line number Diff line number Diff line
@@ -290,13 +290,11 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
         * Authentication has happened and it's time to dismiss keyguard. This function
         * should clean up and inform KeyguardViewMediator.
         *
         * @param fromPrimaryAuth whether the user has authenticated with primary auth like
         *                   pattern, password or PIN but not by trust agents or fingerprint
         * @param targetUserId a user that needs to be the foreground user at the dismissal
         *                    completion.
         */
        @Override
        public void finish(boolean fromPrimaryAuth, int targetUserId) {
        public void finish(int targetUserId) {
            // If there's a pending runnable because the user interacted with a widget
            // and we're leaving keyguard, then run it.
            boolean deferKeyguardDone = false;
@@ -309,9 +307,9 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
            }
            if (mViewMediatorCallback != null) {
                if (deferKeyguardDone) {
                    mViewMediatorCallback.keyguardDonePending(fromPrimaryAuth, targetUserId);
                    mViewMediatorCallback.keyguardDonePending(targetUserId);
                } else {
                    mViewMediatorCallback.keyguardDone(fromPrimaryAuth, targetUserId);
                    mViewMediatorCallback.keyguardDone(targetUserId);
                }
            }

@@ -690,8 +688,8 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
    /**
     * Dismiss keyguard due to a user unlock event.
     */
    public void finish(boolean primaryAuth, int currentUser) {
        mKeyguardSecurityCallback.finish(primaryAuth, currentUser);
    public void finish(int currentUser) {
        mKeyguardSecurityCallback.finish(currentUser);
    }

    /**
@@ -902,7 +900,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
            mUiEventLogger.log(uiEvent, getSessionId());
        }
        if (finish) {
            mKeyguardSecurityCallback.finish(primaryAuth, targetUserId);
            mKeyguardSecurityCallback.finish(targetUserId);
        }
        return finish;
    }
+3 −7
Original line number Diff line number Diff line
@@ -29,11 +29,9 @@ public interface ViewMediatorCallback {
    /**
     * Report that the keyguard is done.
     *
     * @param primaryAuth whether the user has authenticated with primary authentication like
     *                   pattern, password or PIN but not by trust agents or fingerprint
     * @param targetUserId a user that needs to be the foreground user at the completion.
     */
    void keyguardDone(boolean primaryAuth, int targetUserId);
    void keyguardDone(int targetUserId);

    /**
     * Report that the keyguard is done drawing.
@@ -47,13 +45,11 @@ public interface ViewMediatorCallback {
    void setNeedsInput(boolean needsInput);

    /**
     * Report that the keyguard is dismissable, pending the next keyguardDone call.
     * Report that the keyguard is dismissible, pending the next keyguardDone call.
     *
     * @param primaryAuth whether the user has authenticated with primary authentication like
     *                   pattern, password or PIN but not by trust agents or fingerprint
     * @param targetUserId a user that needs to be the foreground user at the completion.
     */
    void keyguardDonePending(boolean primaryAuth, int targetUserId);
    void keyguardDonePending(int targetUserId);

    /**
     * Report when keyguard is actually gone
+0 −1
Original line number Diff line number Diff line
@@ -221,7 +221,6 @@ object KeyguardBouncerViewBinder {
                    launch {
                        viewModel.keyguardAuthenticated.collect {
                            securityContainerController.finish(
                                it,
                                KeyguardUpdateMonitor.getCurrentUser()
                            )
                            viewModel.notifyKeyguardAuthenticated()
+3 −2
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@ import java.util.concurrent.Executor;
import java.util.function.Consumer;

import dagger.Lazy;

import kotlinx.coroutines.CoroutineDispatcher;

/**
@@ -775,7 +776,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
        }

        @Override
        public void keyguardDone(boolean primaryAuth, int targetUserId) {
        public void keyguardDone(int targetUserId) {
            if (targetUserId != KeyguardUpdateMonitor.getCurrentUser()) {
                return;
            }
@@ -796,7 +797,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
        }

        @Override
        public void keyguardDonePending(boolean primaryAuth, int targetUserId) {
        public void keyguardDonePending(int targetUserId) {
            Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDonePending");
            if (DEBUG) Log.d(TAG, "keyguardDonePending");
            if (targetUserId != KeyguardUpdateMonitor.getCurrentUser()) {
Loading