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

Commit 68b19ae9 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

7/n: BiometricService is the source of truth for sensor strength

Individual sensor services only need to keep track of their
ID. When doing things that require knowledge of current strength,
query BiometricService.

Bug: 149067920
Fixes: 151953729

Test: atest com.android.server.biometrics
Test: BiometricPromptDemo

Change-Id: Id2b7cd4e02c1a4b4707950285923f8166b8f46e1
parent bc479d5d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -66,4 +66,6 @@ interface IBiometricService {
    // the requirements for integrating with Keystore. The AuthenticatorID are known in Keystore
    // land as SIDs, and are used during key generation.
    long[] getAuthenticatorIds();

    int getCurrentStrength(int sensorId);
}
+1 −3
Original line number Diff line number Diff line
@@ -26,9 +26,7 @@ package android.hardware.biometrics;
oneway interface IBiometricServiceReceiverInternal {
    // Notify BiometricService that authentication was successful. If user confirmation is required,
    // the auth token must be submitted into KeyStore.
    // TODO(b/151967372): Strength should be changed to authenticatorId
    void onAuthenticationSucceeded(boolean requireConfirmation, in byte[] token,
            boolean isStrongBiometric);
    void onAuthenticationSucceeded(int sensorId, boolean requireConfirmation, in byte[] token);
    // Notify BiometricService authentication was rejected.
    void onAuthenticationFailed();
    // Notify BiometricService than an error has occured. Forward to the correct receiver depending
+2 −2
Original line number Diff line number Diff line
@@ -111,6 +111,6 @@ interface IFaceService {

    void userActivity();

    // Initialize the OEM configured biometric strength
    void initConfiguredStrength(int strength);
    // Give FaceService its ID. See AuthService.java
    void initializeConfiguration(int sensorId);
}
+2 −2
Original line number Diff line number Diff line
@@ -114,6 +114,6 @@ interface IFingerprintService {
    // Removes a callback set by addClientActiveCallback
    void removeClientActiveCallback(IFingerprintClientActiveCallback callback);

    // Initialize the OEM configured biometric strength
    void initConfiguredStrength(int strength);
    // Give FingerprintService its ID. See AuthService.java
    void initializeConfiguration(int sensorId);
}
+2 −2
Original line number Diff line number Diff line
@@ -21,6 +21,6 @@ package android.hardware.iris;
 * @hide
 */
interface IIrisService {
    // Initialize the OEM configured biometric strength
    void initConfiguredStrength(int strength);
    // Give IrisService its ID. See AuthService.java
    void initializeConfiguration(int sensorId);
}
Loading