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

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

Tweaks to fingerprint AIDL

1) Explicit numbering for Error enum, which contains intentionally
   skipped entries for backwards compatibility
2) Documentation for vendorCode. The vendorCodes must have a well
   defined behavior with the array API for things like GSI to work,
   e.g. generic system image with non-generic HAL implementation -
   with this explicit requirement, both components, as long as the
   contract is followed, would allow proper string feedback to be
   loaded/shown.

Bug: 168843220
Test: Builds
Change-Id: Ie78e42b926351a03162a4a6e40f3325641c34609
parent 3388eebd
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -34,28 +34,28 @@ enum Error {
     * The implementation is unable to process the request. For example, invalid arguments were
     * supplied.
     */
    UNABLE_TO_PROCESS,
    UNABLE_TO_PROCESS = 2,

    /**
     * The current operation took too long to complete.
     */
    TIMEOUT,
    TIMEOUT = 3,

    /**
     * No space available to store additional enrollments.
     */
    NO_SPACE,
    NO_SPACE = 4,

    /**
     * The operation was canceled. See common::ICancellationSignal.
     */
    CANCELED,
    CANCELED = 5,

    /**
     * The implementation was unable to remove an enrollment.
     * See ISession#removeEnrollments.
     */
    UNABLE_TO_REMOVE,
    UNABLE_TO_REMOVE = 6,

    /**
     * Reserved to maintain backwards compatibility. See ISessionCallback#onLockoutTimed instead.
+8 −2
Original line number Diff line number Diff line
@@ -38,7 +38,10 @@ interface ISessionCallback {
     * operation.
     *
     * @param info See the AcquiredInfo enum.
     * @param vendorCode Only valid if info == AcquiredInfo::VENDOR.
     * @param vendorCode Only valid if info == AcquiredInfo::VENDOR. The vendorCode must be used to
     *                   index into the configuration
     *                   com.android.internal.R.array.fingerprint_acquired_vendor that's installed
     *                   on the vendor partition.
     */
    void onAcquired(in AcquiredInfo info, in int vendorCode);

@@ -58,7 +61,10 @@ interface ISessionCallback {
     * an Error::CANCELED message.
     *
     * @param error See the Error enum.
     * @param vendorCode Only valid if error == Error::VENDOR.
     * @param vendorCode Only valid if error == Error::VENDOR. The vendorCode must be used to index
     *                   into the configuration
     *                   com.android.internal.R.fingerprint_error_vendor that's installed on the
     *                   vendor partition.
     */
    void onError(in Error error, in int vendorCode);