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

Commit 804fcb2c authored by Joe Bolinger's avatar Joe Bolinger Committed by Automerger Merge Worker
Browse files

Merge changes I57f018e4,Ib1e92278 into sc-dev am: 16cd6bb8 am: f9742d81 am: 479e47ec

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669695

Change-Id: Ie96c4dca25291de86cdec6fb6e8dad6bcd9cc919
parents 32bd24d5 479e47ec
Loading
Loading
Loading
Loading
+21 −1
Original line number Original line Diff line number Diff line
@@ -34,7 +34,6 @@ import android.content.Context;
import android.os.IBinder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserHandle;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.security.keystore.KeyProperties;
import android.util.Slog;
import android.util.Slog;


@@ -97,6 +96,27 @@ public class BiometricManager {
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface BiometricError {}
    public @interface BiometricError {}


    /**
     * Single sensor or unspecified multi-sensor behavior (prefer an explicit choice if the
     * device is multi-sensor).
     * @hide
     */
    public static final int BIOMETRIC_MULTI_SENSOR_DEFAULT = 0;

    /**
     * Prefer the face sensor and fall back to fingerprint when needed.
     * @hide
     */
    public static final int BIOMETRIC_MULTI_SENSOR_FACE_THEN_FINGERPRINT = 1;

    /**
     * @hide
     */
    @IntDef({BIOMETRIC_MULTI_SENSOR_DEFAULT,
            BIOMETRIC_MULTI_SENSOR_FACE_THEN_FINGERPRINT})
    @Retention(RetentionPolicy.SOURCE)
    public @interface BiometricMultiSensorMode {}

    /**
    /**
     * Types of authenticators, defined at a level of granularity supported by
     * Types of authenticators, defined at a level of granularity supported by
     * {@link BiometricManager} and {@link BiometricPrompt}.
     * {@link BiometricManager} and {@link BiometricPrompt}.
+3 −1
Original line number Original line Diff line number Diff line
@@ -28,6 +28,8 @@ oneway interface IBiometricSysuiReceiver {
    void onDeviceCredentialPressed();
    void onDeviceCredentialPressed();
    // Notifies the client that an internal event, e.g. back button has occurred.
    // Notifies the client that an internal event, e.g. back button has occurred.
    void onSystemEvent(int event);
    void onSystemEvent(int event);
    // Notifies that the dialog has finished animating in.
    // Notifies that the dialog has finished animating.
    void onDialogAnimatedIn();
    void onDialogAnimatedIn();
    // For multi-sensor devices, notifies that the fingerprint should start now.
    void onStartFingerprintNow();
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ oneway interface IStatusBar
    // Used to show the authentication dialog (Biometrics, Device Credential)
    // Used to show the authentication dialog (Biometrics, Device Credential)
    void showAuthenticationDialog(in PromptInfo promptInfo, IBiometricSysuiReceiver sysuiReceiver,
    void showAuthenticationDialog(in PromptInfo promptInfo, IBiometricSysuiReceiver sysuiReceiver,
            in int[] sensorIds, boolean credentialAllowed, boolean requireConfirmation, int userId,
            in int[] sensorIds, boolean credentialAllowed, boolean requireConfirmation, int userId,
            String opPackageName, long operationId);
            String opPackageName, long operationId, int multiSensorConfig);
    // Used to notify the authentication dialog that a biometric has been authenticated
    // Used to notify the authentication dialog that a biometric has been authenticated
    void onBiometricAuthenticated();
    void onBiometricAuthenticated();
    // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc
    // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc
+1 −1
Original line number Original line Diff line number Diff line
@@ -110,7 +110,7 @@ interface IStatusBarService
    // Used to show the authentication dialog (Biometrics, Device Credential)
    // Used to show the authentication dialog (Biometrics, Device Credential)
    void showAuthenticationDialog(in PromptInfo promptInfo, IBiometricSysuiReceiver sysuiReceiver,
    void showAuthenticationDialog(in PromptInfo promptInfo, IBiometricSysuiReceiver sysuiReceiver,
            in int[] sensorIds, boolean credentialAllowed, boolean requireConfirmation,
            in int[] sensorIds, boolean credentialAllowed, boolean requireConfirmation,
            int userId, String opPackageName,long operationId);
            int userId, String opPackageName, long operationId, int multiSensorConfig);


    // Used to notify the authentication dialog that a biometric has been authenticated
    // Used to notify the authentication dialog that a biometric has been authenticated
    void onBiometricAuthenticated();
    void onBiometricAuthenticated();
+14 −0
Original line number Original line Diff line number Diff line
@@ -91,9 +91,23 @@ message BiometricServiceStateProto {
        STATE_CLIENT_DIED_CANCELLING = 10;
        STATE_CLIENT_DIED_CANCELLING = 10;
    }
    }


    enum MultiSensorState {
        // Initializing or not yet started.
        MULTI_SENSOR_STATE_UNKNOWN = 0;
        // Sensors are in the process of being transitioned and there is no active sensor.
        MULTI_SENSOR_STATE_SWITCHING = 1;
        // Face sensor is being used as the primary input.
        MULTI_SENSOR_STATE_FACE_SCANNING = 2;
        // Fingerprint sensor is being used as the primary input.
        MULTI_SENSOR_STATE_FP_SCANNING = 3;
    }

    repeated SensorServiceStateProto sensor_service_states = 1;
    repeated SensorServiceStateProto sensor_service_states = 1;


    optional AuthSessionState auth_session_state = 2;
    optional AuthSessionState auth_session_state = 2;

    // Additional session state information, when the device has multiple sensors.
    optional MultiSensorState auth_session_multi_sensor_state = 3;
}
}


// Overall state for an instance of a <Biometric>Service, for example FingerprintService or
// Overall state for an instance of a <Biometric>Service, for example FingerprintService or
Loading