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

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

Merge changes from topic "biometrics.fingerprint@2.2"

* changes:
  Add VTS tests for biometrics.fingerprint@2.2
  Define biometrics.fingerprint@2.2
parents 3781f253 b05fa96b
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.biometrics.fingerprint@2.2",
    root: "android.hardware",
    vndk: {
        enabled: true,
    },
    srcs: [
        "types.hal",
        "IBiometricsFingerprint.hal",
        "IBiometricsFingerprintClientCallback.hal",
    ],
    interfaces: [
        "android.hardware.biometrics.fingerprint@2.1",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
}
+58 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.biometrics.fingerprint@2.2;

import @2.1::IBiometricsFingerprint;
import @2.1::RequestStatus;

interface IBiometricsFingerprint extends @2.1::IBiometricsFingerprint {
    /**
     * 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.
     *
     * @param hat a valid Hardware Authentication Token (HAT), generated
     * as a result of a preEnroll() call.
     * @param gid a framework defined fingerprint set (group) id.
     * @param timeoutSec a timeout in seconds.
     * @param windowId optional ID of an illumination window for optical under
     * display fingerprint sensors. Must contain a null pointer if not used.
     *
     * @return debugErrno is a value the framework logs in case it is not 0.
     *
     * A notify() function may be called with a more detailed error structure.
     */
    enroll_2_2(vec<uint8_t> hat, uint32_t gid, uint32_t timeoutSec, handle windowId)
        generates (RequestStatus debugErrno);

    /**
     * Authenticates an operation identified by operationId
     *
     * @param operationId operation id.
     * @param gid fingerprint group id.
     * @param windowId optional ID of an illumination window for optical under
     * display fingerprint sensors. Must contain a null pointer if not used.
     *
     * @return debugErrno is a value the framework logs in case it is not 0.
     */
    authenticate_2_2(uint64_t operationId, uint32_t gid, handle windowId)
        generates (RequestStatus debugErrno);
};
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.biometrics.fingerprint@2.2;

import @2.1::IBiometricsFingerprintClientCallback;

/*
 * This HAL interface communicates asynchronous results from the
 * fingerprint driver in response to user actions on the fingerprint sensor
 */
interface IBiometricsFingerprintClientCallback extends @2.1::IBiometricsFingerprintClientCallback {
    /**
     * Sent when a fingerprint image is acquired by the sensor
     * @param deviceId the instance of this fingerprint device
     * @param acquiredInfo a message about the quality of the acquired image
     * @param vendorCode a vendor-specific message about the quality of the image. Only
     *        valid when acquiredInfo == ACQUIRED_VENDOR
     */
    oneway onAcquired_2_2(uint64_t deviceId, FingerprintAcquiredInfo acquiredInfo,
        int32_t vendorCode);
};
+42 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.biometrics.fingerprint@2.2;

import @2.1::FingerprintAcquiredInfo;

/**
 * Fingerprint acquisition info is meant as feedback for the current operation.
 * Anything but START and ACQUIRED_GOOD must be shown to the user as feedback on
 * how to take action on the current operation. For example,
 * ACQUIRED_IMAGER_DIRTY may be used to tell the user to clean the sensor if it
 * is detected to be dirty.
 * If this causes the current operation to fail, an additional ERROR_CANCELED
 * must be sent to stop the operation in progress (e.g. enrollment).
 * In general, these messages will result in a "Try again" message.
 */
enum FingerprintAcquiredInfo : @2.1::FingerprintAcquiredInfo {
    /**
     * This message represents the earliest message sent at the beginning of the
     * authentication pipeline. It is expected to be used to measure latency. For
     * example, in a camera-based authentication system it's expected to be sent
     * prior to camera initialization. Note this should be sent whenever
     * authentication is restarted (see IBiometricsFace#userActivity).
     * The framework will measure latency based on the time between the last START
     * message and the onAuthenticated callback.
     */
    START = 7,
};
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

cc_test {
    name: "VtsHalBiometricsFingerprintV2_2TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: ["VtsHalBiometricsFingerprintV2_2TargetTest.cpp"],
    static_libs: [
        "android.hardware.biometrics.fingerprint@2.1",
        "android.hardware.biometrics.fingerprint@2.2",
    ],
    test_suites: [
        "general-tests",
        "vts-core",
    ],
}
Loading