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

Commit 9b7ce6e5 authored by Ilya Matyukhin's avatar Ilya Matyukhin Committed by Automerger Merge Worker
Browse files

Merge changes from topic "IFingerprint-explicit-close" into sc-dev am: 679bc7d2

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/13606126

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3799818b7ef1ca7acb557069e8c369bac89ac39b
parents 8770e1bf 679bc7d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,4 +35,5 @@ package android.hardware.biometrics.fingerprint;
interface IFingerprint {
  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);
  void reset();
}
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ interface ISession {
  void getAuthenticatorId(in int cookie);
  void invalidateAuthenticatorId(in int cookie);
  void resetLockout(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat);
  void close(in int cookie);
  void onPointerDown(in int pointerId, in int x, in int y, in float minor, in float major);
  void onPointerUp(in int pointerId);
  void onUiReady();
+11 −10
Original line number Diff line number Diff line
@@ -34,14 +34,15 @@ package android.hardware.biometrics.fingerprint;
@Backing(type="byte") @VintfStability
enum SessionState {
  IDLING = 0,
  GENERATING_CHALLENGE = 1,
  REVOKING_CHALLENGE = 2,
  ENROLLING = 3,
  AUTHENTICATING = 4,
  DETECTING_INTERACTION = 5,
  ENUMERATING_ENROLLMENTS = 6,
  REMOVING_ENROLLMENTS = 7,
  GETTING_AUTHENTICATOR_ID = 8,
  INVALIDATING_AUTHENTICATOR_ID = 9,
  RESETTING_LOCKOUT = 10,
  CLOSED = 1,
  GENERATING_CHALLENGE = 2,
  REVOKING_CHALLENGE = 3,
  ENROLLING = 4,
  AUTHENTICATING = 5,
  DETECTING_INTERACTION = 6,
  ENUMERATING_ENROLLMENTS = 7,
  REMOVING_ENROLLMENTS = 8,
  GETTING_AUTHENTICATOR_ID = 9,
  INVALIDATING_AUTHENTICATOR_ID = 10,
  RESETTING_LOCKOUT = 11,
}
+14 −0
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@ interface IFingerprint {
     * Creates a session which can then be used by the framework to perform operations such as
     * enroll, authenticate, etc for the given sensorId and userId.
     *
     * Calling this method while there is an active session is considered an error. If the
     * framework is in a bad state and for some reason cannot close its session, it should use
     * the reset method below.
     *
     * A physical sensor identified by sensorId typically supports only a single in-flight session
     * at a time. As such, if a session is currently in a state other than SessionState::IDLING, the
     * HAL MUST finish or cancel the current operation and return to SessionState::IDLING before the
@@ -61,4 +65,14 @@ interface IFingerprint {
     * @return A new session
     */
    ISession createSession(in int sensorId, in int userId, in ISessionCallback cb);

    /**
     * Resets the HAL into a clean state, forcing it to cancel all of the pending operations, close
     * its current session, and release all of the acquired resources.
     *
     * This should be used as a last resort to recover the HAL if the current session becomes
     * unresponsive. The implementation might choose to restart the HAL process to get back into a
     * good state.
     */
    void reset();
}
+18 −1
Original line number Diff line number Diff line
@@ -366,6 +366,24 @@ interface ISession {
     */
    void resetLockout(in int cookie, in HardwareAuthToken hat);

    /*
     * Close this session and allow the HAL to release the resources associated with this session.
     *
     * A session can only be closed when it's in SessionState::IDLING. Closing a session will
     * result in a ISessionCallback#onStateChanged call with SessionState::CLOSED.
     *
     * If a session is unresponsive or stuck in a state other than SessionState::CLOSED,
     * IFingerprint#reset could be used as a last resort to terminate the session and recover the
     * HAL from a bad state.
     *
     * All sessions must be explicitly closed. Calling IFingerprint#createSession while there is an
     * active session is considered an error.
     *
     * @param cookie An identifier used to track subsystem operations related to this call path. The
     *               client must guarantee that it is unique per ISession.
     */
    void close(in int cookie);

    /**
     * Methods for notifying the under-display fingerprint sensor about external events.
     */
@@ -420,4 +438,3 @@ interface ISession {
     */
    void onUiReady();
}
Loading