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

Commit ef79d661 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Move lockout callbacks to ISessionCallback

Also fixes backward compatibility for AcquiredInfo and Error
constants.

For lockout-related changes:
1) If a session doesn't exist, it means the framework (or higher)
   doesn't care about its lockout state.
2) This allows the ISession#authenticate lifecycle to be clearer,
   e.g. no need for ILockoutCallback#onLockoutTimed followed by
   ISessionCallback#onError(LOCKOUT)

Bug: 168842956
Bug: 168843220

Test: make -j android.hardware.biometrics.fingerprint-update-api
Test: make -j
Test: make -j VtsHalBiometricsFingerprintTargetTest
Change-Id: I0b7e7ab3b89d0d1d7647535af07766c493a2067b
parent 8b3cd5db
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -24,6 +24,6 @@ enum AcquiredInfo {
  SENSOR_DIRTY = 3,
  SENSOR_DIRTY = 3,
  TOO_SLOW = 4,
  TOO_SLOW = 4,
  TOO_FAST = 5,
  TOO_FAST = 5,
  START = 6,
  VENDOR = 6,
  VENDOR = 7,
  START = 7,
}
}
+6 −8
Original line number Original line Diff line number Diff line
@@ -18,13 +18,11 @@
package android.hardware.biometrics.fingerprint;
package android.hardware.biometrics.fingerprint;
@Backing(type="byte") @VintfStability
@Backing(type="byte") @VintfStability
enum Error {
enum Error {
  HW_UNAVAILABLE = 0,
  HW_UNAVAILABLE = 1,
  UNABLE_TO_PROCESS = 1,
  UNABLE_TO_PROCESS = 2,
  TIMEOUT = 2,
  TIMEOUT = 3,
  NO_SPACE = 3,
  NO_SPACE = 4,
  CANCELED = 4,
  CANCELED = 5,
  UNABLE_TO_REMOVE = 5,
  UNABLE_TO_REMOVE = 6,
  LOCKOUT = 6,
  LOCKOUT_PERMANENT = 7,
  VENDOR = 8,
  VENDOR = 8,
}
}
+0 −1
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@ package android.hardware.biometrics.fingerprint;
interface IFingerprint {
interface IFingerprint {
  android.hardware.biometrics.fingerprint.SensorProps[] getSensorProps();
  android.hardware.biometrics.fingerprint.SensorProps[] getSensorProps();
  android.hardware.biometrics.fingerprint.ISession createSession(in int sensorId, in int userId, in android.hardware.biometrics.fingerprint.ISessionCallback cb);
  android.hardware.biometrics.fingerprint.ISession createSession(in int sensorId, in int userId, in android.hardware.biometrics.fingerprint.ISessionCallback cb);
  void setLockoutCallback(in android.hardware.biometrics.fingerprint.ILockoutCallback cb);
  void generateChallenge(in int sensorId, in int userId, in int timeoutSec, in android.hardware.biometrics.fingerprint.IGenerateChallengeCallback cb);
  void generateChallenge(in int sensorId, in int userId, in int timeoutSec, in android.hardware.biometrics.fingerprint.IGenerateChallengeCallback cb);
  void revokeChallenge(in int sensorId, in int userId, in long challenge, in android.hardware.biometrics.fingerprint.IRevokeChallengeCallback cb);
  void revokeChallenge(in int sensorId, in int userId, in long challenge, in android.hardware.biometrics.fingerprint.IRevokeChallengeCallback cb);
}
}
+0 −24
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.biometrics.fingerprint;
@VintfStability
interface ILockoutCallback {
  oneway void onLockoutTimed(in int sensorId, in int userId, in long durationMillis);
  oneway void onLockoutPermanent(in int sensorId, in int userId);
  oneway void onLockoutCleared(in int sensorId, in int userId);
}
+3 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,9 @@ interface ISessionCallback {
  void onEnrollmentProgress(in int enrollmentId, int remaining);
  void onEnrollmentProgress(in int enrollmentId, int remaining);
  void onAuthenticationSucceeded(in int enrollmentId, in android.hardware.keymaster.HardwareAuthToken hat);
  void onAuthenticationSucceeded(in int enrollmentId, in android.hardware.keymaster.HardwareAuthToken hat);
  void onAuthenticationFailed();
  void onAuthenticationFailed();
  void onLockoutTimed(in long durationMillis);
  void onLockoutPermanent();
  void onLockoutCleared();
  void onInteractionDetected();
  void onInteractionDetected();
  void onEnrollmentsEnumerated(in int[] enrollmentIds);
  void onEnrollmentsEnumerated(in int[] enrollmentIds);
  void onEnrollmentsRemoved(in int[] enrollmentIds);
  void onEnrollmentsRemoved(in int[] enrollmentIds);
Loading