Set enum defaults for biometrics

Bug: 179853316
Test: m android.hardware.biometrics.common-update-api
Test: m android.hardware.biometrics.fingerprint-update-api
Test: m android.hardware.biometrics.face-update-api
Test: build
Change-Id: Ia13a0e59a5009e17496e84c593a64e3da27fac05
This commit is contained in:
Ilya Matyukhin 2021-02-26 13:53:17 -08:00
parent 3cc3cacbc7
commit cd690782ca
15 changed files with 102 additions and 44 deletions

View file

@ -1,14 +1,29 @@
///////////////////////////////////////////////////////////////////////////////
/*
* 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.
*////////////////////////////////////////////////////////////////////////////////
// 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.
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible changes to the AIDL files built
// You must not make a backward incompatible change to any AIDL file 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
@ -19,7 +34,7 @@ package android.hardware.biometrics.common;
@VintfStability
parcelable CommonProps {
int sensorId;
android.hardware.biometrics.common.SensorStrength sensorStrength;
android.hardware.biometrics.common.SensorStrength sensorStrength = android.hardware.biometrics.common.SensorStrength.CONVENIENCE;
int maxEnrollmentsPerUser;
android.hardware.biometrics.common.HardwareInfo[] hardwareInfo;
}

View file

@ -1,14 +1,29 @@
///////////////////////////////////////////////////////////////////////////////
/*
* 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.
*////////////////////////////////////////////////////////////////////////////////
// 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.
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible changes to the AIDL files built
// You must not make a backward incompatible change to any AIDL file 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

View file

@ -1,14 +1,29 @@
///////////////////////////////////////////////////////////////////////////////
/*
* 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.
*////////////////////////////////////////////////////////////////////////////////
// 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.
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible changes to the AIDL files built
// You must not make a backward incompatible change to any AIDL file 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

View file

@ -1,14 +1,29 @@
///////////////////////////////////////////////////////////////////////////////
/*
* 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.
*////////////////////////////////////////////////////////////////////////////////
// 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.
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible changes to the AIDL files built
// You must not make a backward incompatible change to any AIDL file 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

View file

@ -33,7 +33,7 @@ parcelable CommonProps {
* A statically configured strength for this sensor. See the SensorStrength interface for more
* information.
*/
SensorStrength sensorStrength;
SensorStrength sensorStrength = SensorStrength.CONVENIENCE;
/**
* The maximum number of enrollments that a single user can have. Statically configured.

View file

@ -33,7 +33,7 @@
package android.hardware.biometrics.face;
@VintfStability
parcelable BaseFrame {
android.hardware.biometrics.face.AcquiredInfo acquiredInfo;
android.hardware.biometrics.face.AcquiredInfo acquiredInfo = android.hardware.biometrics.face.AcquiredInfo.INSUFFICIENT;
int vendorCode;
float pan;
float tilt;

View file

@ -34,6 +34,6 @@ package android.hardware.biometrics.face;
@VintfStability
parcelable EnrollmentFrame {
@nullable android.hardware.biometrics.face.Cell cell;
android.hardware.biometrics.face.EnrollmentStage stage;
android.hardware.biometrics.face.EnrollmentStage stage = android.hardware.biometrics.face.EnrollmentStage.FIRST_FRAME_RECEIVED;
android.hardware.biometrics.face.BaseFrame data;
}

View file

@ -33,6 +33,6 @@
package android.hardware.biometrics.face;
@VintfStability
parcelable EnrollmentStageConfig {
android.hardware.biometrics.face.EnrollmentStage stage;
android.hardware.biometrics.face.EnrollmentStage stage = android.hardware.biometrics.face.EnrollmentStage.FIRST_FRAME_RECEIVED;
List<android.hardware.biometrics.face.Cell> cells;
}

View file

@ -34,7 +34,7 @@ package android.hardware.biometrics.face;
@VintfStability
parcelable SensorProps {
android.hardware.biometrics.common.CommonProps commonProps;
android.hardware.biometrics.face.FaceSensorType sensorType;
android.hardware.biometrics.face.FaceSensorType sensorType = android.hardware.biometrics.face.FaceSensorType.RGB;
boolean halControlsPreview;
int enrollPreviewWidth;
int enrollPreviewHeight;

View file

@ -29,7 +29,7 @@ parcelable BaseFrame {
* Information about the frame that can be used by the framework to provide feedback to the
* user, for example ask the user to move their face in a certain way.
*/
AcquiredInfo acquiredInfo;
AcquiredInfo acquiredInfo = AcquiredInfo.INSUFFICIENT;
/**
* If acquiredInfo is set to AcquiredInfo::VENDOR. This is the index into the configuration

View file

@ -16,9 +16,9 @@
package android.hardware.biometrics.face;
import android.hardware.biometrics.face.BaseFrame;
import android.hardware.biometrics.face.Cell;
import android.hardware.biometrics.face.EnrollmentStage;
import android.hardware.biometrics.face.BaseFrame;
/**
* Describes an individual frame captured during enrollment.
@ -33,7 +33,7 @@ parcelable EnrollmentFrame {
/**
* The enrollment stage for which this frame was captured.
*/
EnrollmentStage stage;
EnrollmentStage stage = EnrollmentStage.FIRST_FRAME_RECEIVED;
/**
* The frame metadata. Can be used by the framework to provide user feedback.

View file

@ -24,7 +24,7 @@ parcelable EnrollmentStageConfig {
/**
* The stage that's being configured.
*/
EnrollmentStage stage;
EnrollmentStage stage = EnrollmentStage.FIRST_FRAME_RECEIVED;
/**
* Optional list of cells that must be completed to finish this stage.

View file

@ -29,7 +29,7 @@ parcelable SensorProps {
/**
* A statically configured sensor type representing this face sensor.
*/
FaceSensorType sensorType;
FaceSensorType sensorType = FaceSensorType.RGB;
/**
* Whether or not the HAL is responsible for showing the face enrollment preview to the user.
@ -76,4 +76,3 @@ parcelable SensorProps {
*/
boolean supportsDetectInteraction;
}

View file

@ -34,7 +34,7 @@ package android.hardware.biometrics.fingerprint;
@VintfStability
parcelable SensorProps {
android.hardware.biometrics.common.CommonProps commonProps;
android.hardware.biometrics.fingerprint.FingerprintSensorType sensorType;
android.hardware.biometrics.fingerprint.FingerprintSensorType sensorType = android.hardware.biometrics.fingerprint.FingerprintSensorType.UNKNOWN;
android.hardware.biometrics.fingerprint.SensorLocation[] sensorLocations;
boolean supportsNavigationGestures;
boolean supportsDetectInteraction;

View file

@ -30,7 +30,7 @@ parcelable SensorProps {
/**
* A statically configured sensor type representing this fingerprint sensor.
*/
FingerprintSensorType sensorType;
FingerprintSensorType sensorType = FingerprintSensorType.UNKNOWN;
/**
* A list of display-specific locations from where the sensor is usable from. See SensorLocation
@ -49,4 +49,3 @@ parcelable SensorProps {
*/
boolean supportsDetectInteraction;
}