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

Commit 567b731d authored by Jeff Pu's avatar Jeff Pu Committed by Android (Google) Code Review
Browse files

Merge "Face VHAL for user build" into main

parents 86887a1c a3c5736d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -100,7 +100,11 @@ class Config {
        } else if (std::holds_alternative<OptIntVec>(v)) {
            for (auto x : std::get<OptIntVec>(v))
                if (x.has_value()) os << x.value() << " ";
        } else if (std::holds_alternative<OptString>(v)) {
            OptString ov = std::get<OptString>(v);
            if (ov.has_value()) os << ov.value();
        }

        return os.str();
    }
    std::string toString() const {
+39 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ aidl_interface {
    name: "android.hardware.biometrics.face",
    vendor_available: true,
    srcs: [
        "android/hardware/biometrics/face/**/*.aidl",
        "android/hardware/biometrics/face/*.aidl",
    ],
    imports: [
        "android.hardware.biometrics.common-V4",
@@ -36,6 +36,10 @@ aidl_interface {
            additional_shared_libraries: [
                "libnativewindow",
            ],
            apex_available: [
                "//apex_available:platform",
                "com.android.hardware.biometrics.face.virtual",
            ],
        },
    },
    versions_with_info: [
@@ -74,5 +78,39 @@ aidl_interface {

    ],
    frozen: true,
}

aidl_interface {
    name: "android.hardware.biometrics.face.virtualhal",
    srcs: [
        "android/hardware/biometrics/face/virtualhal/*.aidl",
    ],
    imports: [
        "android.hardware.biometrics.common-V4",
        "android.hardware.keymaster-V4",
        "android.hardware.biometrics.face-V4",
    ],
    vendor_available: true,
    unstable: true,
    backend: {
        java: {
            platform_apis: true,
        },
        rust: {
            enabled: false,
        },
        cpp: {
            enabled: false,
        },
        ndk: {
            additional_shared_libraries: [
                "libnativewindow",
            ],
            apex_available: [
                "com.android.hardware.biometrics.face.virtual",
                "//apex_available:platform",
            ],
        },
    },
    frozen: false,
}
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ interface ISession {
     * Note that this interface allows multiple in-flight challenges. Invoking generateChallenge
     * twice does not invalidate the first challenge. The challenge is invalidated only when:
     *   1) Its lifespan exceeds the challenge timeout defined in the TEE.
     *   2) IFingerprint#revokeChallenge is invoked
     *   2) IFace#revokeChallenge is invoked
     *
     * For example, the following is a possible table of valid challenges:
     * ----------------------------------------------
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.face.virtualhal;

import android.hardware.biometrics.face.AcquiredInfo;

/**
 * @hide
 */
union AcquiredInfoAndVendorCode {
    /**
     * Acquired info as specified in AcqauiredInfo.aidl
     */
    AcquiredInfo acquiredInfo = AcquiredInfo.UNKNOWN;

    /**
     * Vendor specific code
     */
    int vendorCode;
}
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.face.virtualhal;

import android.hardware.biometrics.face.virtualhal.AcquiredInfoAndVendorCode;

/**
 * @hide
 */
parcelable EnrollmentProgressStep {
    /**
     * The duration of the enrollment step in milli-seconds
     */
    int durationMs;

    /**
     * The sequence of acquired info and vendor code to be issued by HAL during the step.
     * The codes are evenly spread over the duration
     */
    AcquiredInfoAndVendorCode[] acquiredInfoAndVendorCodes;
}
Loading