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

Commit a3c97c77 authored by Ilya Matyukhin's avatar Ilya Matyukhin Committed by Android (Google) Code Review
Browse files

Merge "Update IFace getFeatures/setFeature and feature names" into sc-dev

parents fe7eed56 9fcf6b1f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum Feature {
  WAVE_ATTENTION_REQUIREMENT = 0,
  WAVE_DIVERSE_POSES_REQUIREMENT = 1,
  REQUIRE_ATTENTION = 0,
  REQUIRE_DIVERSE_POSES = 1,
  DEBUG = 2,
}
+2 −2
Original line number Diff line number Diff line
@@ -41,8 +41,8 @@ interface ISession {
  android.hardware.biometrics.common.ICancellationSignal detectInteraction();
  void enumerateEnrollments();
  void removeEnrollments(in int[] enrollmentIds);
  void getFeatures(in int enrollmentId);
  void setFeature(in android.hardware.keymaster.HardwareAuthToken hat, in int enrollmentId, in android.hardware.biometrics.face.Feature feature, boolean enabled);
  void getFeatures();
  void setFeature(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.Feature feature, boolean enabled);
  void getAuthenticatorId();
  void invalidateAuthenticatorId();
  void resetLockout(in android.hardware.keymaster.HardwareAuthToken hat);
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ interface ISessionCallback {
  void onLockoutCleared();
  void onInteractionDetected();
  void onEnrollmentsEnumerated(in int[] enrollmentIds);
  void onFeaturesRetrieved(in android.hardware.biometrics.face.Feature[] features, in int enrollmentId);
  void onFeatureSet(in int enrollmentId, android.hardware.biometrics.face.Feature feature);
  void onFeaturesRetrieved(in android.hardware.biometrics.face.Feature[] features);
  void onFeatureSet(android.hardware.biometrics.face.Feature feature);
  void onEnrollmentsRemoved(in int[] enrollmentIds);
  void onAuthenticatorIdRetrieved(in long authenticatorId);
  void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
+6 −7
Original line number Diff line number Diff line
@@ -20,20 +20,19 @@ package android.hardware.biometrics.face;
@Backing(type="byte")
enum Feature {
    /**
     * Do not require the user to look at the device during enrollment and authentication. Note
     * this is to accommodate people who have limited vision.
     * Require the user to look at the device during enrollment and authentication. This feature
     * can be disabled to accommodate people who have limited vision.
     */
    WAVE_ATTENTION_REQUIREMENT,
    REQUIRE_ATTENTION,

    /**
     * Do not require a diverse set of poses during enrollment. This is to accommodate people with
     * limited mobility.
     * Require a diverse set of poses during enrollment. This feature can be disabled to accommodate
     * people with limited mobility.
     */
    WAVE_DIVERSE_POSES_REQUIREMENT,
    REQUIRE_DIVERSE_POSES,

    /**
     * Enable debugging functionality.
     */
    DEBUG,
}
+7 −11
Original line number Diff line number Diff line
@@ -249,38 +249,34 @@ interface ISession {
    /**
     * getFeatures:
     *
     * Returns a list of currently enabled features for the provided enrollmentId.
     * Returns a list of currently enabled features for this (sensorId, userId) pair.
     *
     * If the enrollmentId is invalid, the HAL must invoke ISessionCallback#onError with
     * If the user is not enrolled, the HAL must invoke ISessionCallback#onError with
     * Error::UNABLE_TO_PROCESS.
     *
     * The HAL must notify the framework about the result by calling
     * ISessionCallback#onFeaturesRetrieved.
     *
     * @param enrollmentId the ID of the enrollment for which the features are requested.
     */
    void getFeatures(in int enrollmentId);
    void getFeatures();

    /**
     * setFeature:
     *
     * Enables or disables a feature for the given enrollmentId. Because certain features may
     * Enables or disables a feature for this (sensorId, userId) pair. Because certain features may
     * decrease security, the user must enter their password before this method is invoked
     * (see @param hat). The HAL must verify the hat before changing any feature state.
     *
     * If either the hat or enrollmentId is invalid, the HAL must invoke ISessionCallback#onError
     * with Error::UNABLE_TO_PROCESS.
     * If the hat is invalid or if the user is not enrolled, the HAL must invoke
     * ISessionCallback#onError with Error::UNABLE_TO_PROCESS.
     *
     * After the feature is successfully set, the HAL must notify the framework by calling
     * ISessionCallback#onFeatureSet.
     *
     * @param hat HardwareAuthToken See above documentation.
     * @param enrollmentId the ID of the enrollment for which the feature update is requested.
     * @param feature The feature to be enabled or disabled.
     * @param enabled Whether the provided features should be enabled or disabled.
     */
    void setFeature(
            in HardwareAuthToken hat, in int enrollmentId, in Feature feature, boolean enabled);
    void setFeature(in HardwareAuthToken hat, in Feature feature, boolean enabled);

    /**
     * getAuthenticatorId:
Loading