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

Commit 3358b41e authored by Kevin Chyn's avatar Kevin Chyn
Browse files

4/n: Remove unused parameter

Bug: 11196423

Test: atest com.android.server.biometrics
Change-Id: I2fc015edd32215da076bd551fc6cafd59ff00a1f
parent 1ba3a42a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ interface IBiometricService {

    // Notify BiometricService when <Biometric>Service is ready to start the prepared client.
    // Client lifecycle is still managed in <Biometric>Service.
    void onReadyForAuthentication(int cookie, boolean requireConfirmation, int userId);
    void onReadyForAuthentication(int cookie, boolean requireConfirmation);

    // Reset the lockout when user authenticates with strong auth (e.g. PIN, pattern or password)
    void resetLockout(in byte [] token);
+3 −6
Original line number Diff line number Diff line
@@ -172,8 +172,7 @@ public class BiometricService extends SystemService {
                    SomeArgs args = (SomeArgs) msg.obj;
                    handleOnReadyForAuthentication(
                            args.argi1 /* cookie */,
                            (boolean) args.arg1 /* requireConfirmation */,
                            args.argi2 /* userId */);
                            (boolean) args.arg1 /* requireConfirmation */);
                    args.recycle();
                    break;
                }
@@ -459,13 +458,12 @@ public class BiometricService extends SystemService {
     */
    private final class BiometricServiceWrapper extends IBiometricService.Stub {
        @Override // Binder call
        public void onReadyForAuthentication(int cookie, boolean requireConfirmation, int userId) {
        public void onReadyForAuthentication(int cookie, boolean requireConfirmation) {
            checkInternalPermission();

            SomeArgs args = SomeArgs.obtain();
            args.argi1 = cookie;
            args.arg1 = requireConfirmation;
            args.argi2 = userId;
            mHandler.obtainMessage(MSG_ON_READY_FOR_AUTHENTICATION, args).sendToTarget();
        }

@@ -1052,8 +1050,7 @@ public class BiometricService extends SystemService {
     * Invoked when each service has notified that its client is ready to be started. When
     * all biometrics are ready, this invokes the SystemUI dialog through StatusBar.
     */
    private void handleOnReadyForAuthentication(int cookie, boolean requireConfirmation,
            int userId) {
    private void handleOnReadyForAuthentication(int cookie, boolean requireConfirmation) {
        if (mCurrentAuthSession == null) {
            // Only should happen if a biometric was locked out when authenticate() was invoked.
            // In that case, if device credentials are allowed, the UI is already showing. If not
+1 −1
Original line number Diff line number Diff line
@@ -1126,7 +1126,7 @@ public abstract class BiometricServiceBase extends SystemService
                    }
                    try {
                        mBiometricService.onReadyForAuthentication(client.getCookie(),
                                client.getRequireConfirmation(), client.getTargetUserId());
                                client.getRequireConfirmation());
                    } catch (RemoteException e) {
                        Slog.e(getTag(), "Remote exception", e);
                    }
+2 −2
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ public class BiometricServiceTest {

        // onReadyForAuthentication, mCurrentAuthSession state OK
        mBiometricService.mImpl.onReadyForAuthentication(cookieCaptor.getValue(),
                anyBoolean() /* requireConfirmation */, anyInt() /* userId */);
                mBiometricService.mCurrentAuthSession.mPreAuthInfo.confirmationRequested);
        waitForIdle();
        assertEquals(AuthSession.STATE_AUTH_STARTED,
                mBiometricService.mCurrentAuthSession.getState());
@@ -1510,7 +1510,7 @@ public class BiometricServiceTest {
        assertNotEquals(cookie, 0);

        service.mImpl.onReadyForAuthentication(cookie,
                anyBoolean() /* requireConfirmation */, anyInt() /* userId */);
                preAuthInfo.confirmationRequested /* requireConfirmation */);
    }

    private static void invokeAuthenticate(IBiometricService.Stub service,