Package: android.hardware.biometrics.fingerprint@2.1

IBiometricsFingerprint

interface IBiometricsFingerprint

Methods

setNotify

setNotify (IBiometricsFingerprintClientCallback clientCallback)
generates (uint64_t deviceId)

Set notification callback:Registers a user function that must receive notifications from the HAL This call must block if the HAL state machine is in busy state until HAL leaves the busy state.

Details
Parameters
clientCallback
Generates
deviceId
is a unique handle for this fingerprint device
Annotations
callflow
next= { "setActiveGroup" }
entry

preEnroll

preEnroll ()
generates (uint64_t authChallenge)

Fingerprint pre-enroll enroll request:Generates a unique token to upper layers to indicate the start of an enrollment transaction.pre-enroll and post-enroll specify a pin/password cleared time window where enrollment is allowed.Pre-enroll only generates a challenge, a full hardwareAuthToken is generated by trustzone after verifying a pin/password/swipe.This is to ensure adding a new fingerprint template was preceded by some kind of credential confirmation(e.g.device password).

Details
Generates
authChallenge
Annotations
callflow
next= { "enroll" , "postEnroll" }

enroll

enroll (uint8_t[69] hat, uint32_t gid, uint32_t timeoutSec)
generates (RequestStatus debugErrno)

Fingerprint enroll request:Switches the HAL state machine to collect and store a new fingerprint template.Switches back as soon as enroll is complete, signalled by(fingerprintMsg.type == FINGERPRINT_TEMPLATE_ENROLLING && fingerprintMsg.data.enroll.samplesRemaining == 0)or after timeoutSec seconds.The fingerprint template must be assigned to the group gid.

A notify() function may be called with a more detailed error structure.

Details
Parameters
hat
a valid Hardware Authentication Token(HAT), generated as a result of a preEnroll() call.
gid
a framework defined fingerprint set(group)id.
timeoutSec
a timeout in seconds.
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "cancel" , "enroll" , "postEnroll" , "remove" }

postEnroll

postEnroll ()
generates (RequestStatus debugErrno)

Finishes the enroll operation and invalidates the preEnroll() generated challenge.This must be called at the end of a multi-finger enrollment session to indicate that no more fingers may be added.

Details
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "authenticate" , "setActiveGroup" , "enumerate" , "remove" }

getAuthenticatorId

getAuthenticatorId ()
generates (uint64_t AuthenticatorId)

getAuthenticatorId:Returns a token associated with the current fingerprint set.This value must change whenever a new fingerprint is enrolled, thus creating a new fingerprint set.

Details
Generates
AuthenticatorId
Annotations
callflow
next= { "authenticate" }

cancel

cancel ()
generates (RequestStatus debugErrno)

Cancel pending enroll or authenticate, sending FINGERPRINT_ERROR_CANCELED to all running clients.Switches the HAL state machine back to the idle state.Unlike enrollDone() doesn't invalidate the preEnroll() challenge.

Details
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "authenticate" , "enroll" , "enumerate" , "remove" , "setActiveGroup" }

enumerate

enumerate ()
generates (RequestStatus debugErrno)

Enumerate all the fingerprint templates found in the directory set by setActiveGroup():For each template found a notify() must be called with:fingerprintMsg.type == FINGERPRINT_TEMPLATE_ENUMERATED fingerprintMsg.data.enumerated.finger indicating a template id fingerprintMsg.data.enumerated.remainingTemplates indicating how many more enumeration messages to expect.

Details
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "remove" , "enroll" , "authenticate" , "setActiveGroup" }

remove

remove (uint32_t gid, uint32_t fid)
generates (RequestStatus debugErrno)

Fingerprint remove request:Deletes fingerprint template(s). Works only within the path set by setActiveGroup().For each template found a notify() must be called with:fingerprintMsg.type == FINGERPRINT_TEMPLATE_REMOVED fingerprintMsg.data.removed.finger indicating the template id deleted fingerprintMsg.data.removed.remainingTemplates indicating how many more templates must be deleted by this operation.

Details
Parameters
gid
group id must match the last group set by setActiveGroup().
fid
template id to delete or 0 to delete all templates within the current group.
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "enumerate" , "authenticate" , "cancel" , "getAuthenticatorId" , "setActiveGroup" }

setActiveGroup

setActiveGroup (uint32_t gid, string storePath)
generates (RequestStatus debugErrno)

Restricts the HAL operation to a set of fingerprints belonging to a group provided.The caller must provide a path to a storage location within the user's data directory.

Details
Parameters
gid
the fingerprint group(set)id.
storePath
filesystem path to the template storage directory.
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "authenticate" , "preEnroll" , "enumerate" , "remove" }

authenticate

authenticate (uint64_t operationId, uint32_t gid)
generates (RequestStatus debugErrno)

Authenticates an operation identified by operationId

Details
Parameters
operationId
operation id.
gid
fingerprint group id.
Generates
debugErrno
is a value the framework logs in case it is not 0.
Annotations
callflow
next= { "cancel" , "preEnroll" , "remove" }