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

Commit 7d3fdf5e authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add android.hardware.biometrics.common

Bug: 168541000

Test: make -j56 android.hardware.biometrics.common-update-api
Test: make -j56 android.hardware.biometrics.fingerprint-update-api
Test: make -j56 android.hardware.biometrics.fingerprint-service.example

Change-Id: Icaa1c2a0363a7fa446747ef89b5e50ca44dcd42e
parent 4fd960f9
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
aidl_interface {
    name: "android.hardware.biometrics.common",
    vendor_available: true,
    srcs: [
        "android/hardware/biometrics/common/*.aidl",
    ],
    stability: "vintf",
    backend: {
        java: {
            platform_apis: true,
        },
        cpp: {
            enabled: false,
        },
    }
}
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.biometrics.common;
@VintfStability
parcelable CommonProps {
  int sensorId;
  android.hardware.biometrics.common.SensorStrength sensorStrength;
  int maxEnrollmentsPerUser;
}
+24 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.biometrics.common;
@Backing(type="byte") @VintfStability
enum SensorStrength {
  CONVENIENCE = 0,
  WEAK = 1,
  STRONG = 2,
}
+43 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 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.common;

import android.hardware.biometrics.common.SensorStrength;

@VintfStability
parcelable CommonProps {
    /**
     * A statically configured unique ID that identifies a single biometric
     * sensor. IDs must start at zero and increment by one for each unique
     * sensor. Note that ID allocations are shared between all biometric
     * modalities (e.g. fingerprint, face, iris), and a single ID must never
     * be claimed by more than a single sensor.
     */
    int sensorId;

    /**
     * A statically configured strength for this sensor. See the SensorStrength
     * interface for more information.
     */
    SensorStrength sensorStrength;

    /**
     * The maximum number of enrollments that a single user can have.
     * Statically configured.
     */
    int maxEnrollmentsPerUser;
}
 No newline at end of file
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 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.common;

@VintfStability
@Backing(type="byte")
enum SensorStrength {
    /**
     * A sensor that meets the requirements for Class 1 biometrics as defined
     * in the CDD. This does not correspond to a public BiometricManager.Authenticators
     * constant. Sensors of this strength are not available to applications  ia the
     * public API surface.
     */
    CONVENIENCE,

    /**
     * A sensor that meets the requirements for Class 2 biometrics as defined
     * in the CDD. Corresponds to BiometricManager.Authenticators.BIOMETRIC_WEAK.
     */
    WEAK,

    /**
     * A sensor that meets the requirements for Class 3 biometrics as defined
     * in the CDD. Corresponds to BiometricManager.Authenticators.BIOMETRIC_STRONG.
     *
     * Notably, this is the only strength that allows generation/verification of
     * HardwareAuthToken(s).
     */
    STRONG,
}
 No newline at end of file
Loading