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

Commit 1c9c0ae3 authored by Joshua Mccloskey's avatar Joshua Mccloskey Committed by Android (Google) Code Review
Browse files

Merge "Enabled multibiometric lockout for aidl hals"

parents 04f130ff a3967d8a
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -639,5 +639,24 @@ public class BiometricManager {
            }
        }
    }

    /**
     * Notifies AuthService that keyguard has been dismissed for the given userId.
     *
     * @param userId
     * @param hardwareAuthToken
     * @hide
     */
    @RequiresPermission(USE_BIOMETRIC_INTERNAL)
    public void resetLockout(int userId, byte[] hardwareAuthToken) {
        if (mService != null) {
            try {
                mService.resetLockout(userId, hardwareAuthToken);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
        }

    }
}
+1 −0
Original line number Diff line number Diff line
@@ -73,4 +73,5 @@ public abstract class BiometricStateListener extends IBiometricStateListener.Stu
     */
    public void onEnrollmentsChanged(int userId, int sensorId, boolean hasEnrollments) {
    }

}
+3 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ interface IAuthService {
    void resetLockoutTimeBound(IBinder token, String opPackageName, int fromSensorId, int userId,
            in byte[] hardwareAuthToken);

    // See documentation in BiometricManager.
    void resetLockout(int userId, in byte[] hardwareAuthToken);

    // Provides a localized string that may be used as the label for a button that invokes
    // BiometricPrompt.
    CharSequence getButtonLabel(int userId, String opPackageName, int authenticators);
+4 −0
Original line number Diff line number Diff line
@@ -91,6 +91,10 @@ interface IBiometricService {
    void resetLockoutTimeBound(IBinder token, String opPackageName, int fromSensorId, int userId,
            in byte[] hardwareAuthToken);

    // See documentation in BiometricManager.
    @EnforcePermission("USE_BIOMETRIC_INTERNAL")
    void resetLockout(int userId, in byte[] hardwareAuthToken);

    @EnforcePermission("USE_BIOMETRIC_INTERNAL")
    int getCurrentStrength(int sensorId);

+11 −0
Original line number Diff line number Diff line
@@ -409,6 +409,17 @@ public class AuthService extends SystemService {
            }
        }

        @Override
        public void resetLockout(int userId, byte[] hardwareAuthToken) throws RemoteException {
            checkInternalPermission();
            final long identity = Binder.clearCallingIdentity();
            try {
                mBiometricService.resetLockout(userId, hardwareAuthToken);
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }

        @Override
        public CharSequence getButtonLabel(
                int userId,
Loading