Merge "VTS workaround for RadioSimTest#setAllowedCarriers" into main
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index bbc4caf..8d430de 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -2975,15 +2975,15 @@
// The five methods below is intended to be called after the worker
// thread has joined, thus no extra synchronization is needed.
- bool hasObservablePositionIncrease() const { return mObservablePositionIncrease; }
- bool hasObservableRetrogradePosition() const { return mRetrogradeObservablePosition; }
+ bool hasObservablePositionIncrease() const { return mObservable.hasPositionIncrease; }
+ bool hasObservableRetrogradePosition() const { return mObservable.hasRetrogradePosition; }
bool hasHardwarePositionIncrease() const {
// For non-MMap, always return true to pass the validation.
- return mIsMmap ? mHardwarePositionIncrease : true;
+ return mIsMmap ? mHardware.hasPositionIncrease : true;
}
bool hasHardwareRetrogradePosition() const {
// For non-MMap, always return false to pass the validation.
- return mIsMmap ? mRetrogradeHardwarePosition : false;
+ return mIsMmap ? mHardware.hasRetrogradePosition : false;
}
std::string getUnexpectedStateTransition() const { return mUnexpectedTransition; }
@@ -3011,25 +3011,9 @@
}
bool interceptRawReply(const StreamDescriptor::Reply&) override { return false; }
bool processValidReply(const StreamDescriptor::Reply& reply) override {
- if (reply.observable.frames != StreamDescriptor::Position::UNKNOWN) {
- if (mPreviousObservableFrames.has_value()) {
- if (reply.observable.frames > mPreviousObservableFrames.value()) {
- mObservablePositionIncrease = true;
- } else if (reply.observable.frames < mPreviousObservableFrames.value()) {
- mRetrogradeObservablePosition = true;
- }
- }
- mPreviousObservableFrames = reply.observable.frames;
- }
+ mObservable.update(reply.observable.frames);
if (mIsMmap) {
- if (mPreviousHardwareFrames.has_value()) {
- if (reply.hardware.frames > mPreviousHardwareFrames.value()) {
- mHardwarePositionIncrease = true;
- } else if (reply.hardware.frames < mPreviousHardwareFrames.value()) {
- mRetrogradeHardwarePosition = true;
- }
- }
- mPreviousHardwareFrames = reply.hardware.frames;
+ mHardware.update(reply.hardware.frames);
}
auto expected = mCommands->getExpectedStates();
@@ -3054,16 +3038,30 @@
}
protected:
+ struct FramesCounter {
+ std::optional<int64_t> previous;
+ bool hasPositionIncrease = false;
+ bool hasRetrogradePosition = false;
+
+ void update(int64_t position) {
+ if (position == StreamDescriptor::Position::UNKNOWN) return;
+ if (previous.has_value()) {
+ if (position > previous.value()) {
+ hasPositionIncrease = true;
+ } else if (position < previous.value()) {
+ hasRetrogradePosition = true;
+ }
+ }
+ previous = position;
+ }
+ };
+
std::shared_ptr<StateSequence> mCommands;
const size_t mFrameSizeBytes;
const bool mIsMmap;
std::optional<StreamDescriptor::State> mPreviousState;
- std::optional<int64_t> mPreviousObservableFrames;
- bool mObservablePositionIncrease = false;
- bool mRetrogradeObservablePosition = false;
- std::optional<int64_t> mPreviousHardwareFrames;
- bool mHardwarePositionIncrease = false;
- bool mRetrogradeHardwarePosition = false;
+ FramesCounter mObservable;
+ FramesCounter mHardware;
std::string mUnexpectedTransition;
};
diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index 489d638..2d1e9ab 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -3195,22 +3195,19 @@
}
},
{
- "property": "VehicleProperty::PER_DISPLAY_BRIGHTNESS"
- },
- {
- "property": "VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS",
+ "property": "VehicleProperty::DISPLAY_BRIGHTNESS",
"defaultValue": {
"int32Values": [
- 0,
- 100,
- 1,
- 100,
- 2,
- 100,
- 3,
100
]
- }
+ },
+ "areas": [
+ {
+ "areaId": 0,
+ "minInt32Value": 0,
+ "maxInt32Value": 100
+ }
+ ]
},
{
"property": "VehicleProperty::VALET_MODE_ENABLED",
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
index e182f1c..54dcca2 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -1047,10 +1047,6 @@
VhalResult<void> isAdasPropertyAvailableResult;
VhalResult<bool> isCruiseControlTypeStandardResult;
switch (propId) {
- case toInt(VehicleProperty::DISPLAY_BRIGHTNESS):
- case toInt(VehicleProperty::PER_DISPLAY_BRIGHTNESS):
- ALOGD("DISPLAY_BRIGHTNESS: %s", value.toString().c_str());
- return {};
case toInt(VehicleProperty::AP_POWER_STATE_REPORT):
*isSpecialValue = true;
return setApPowerStateReport(value);
diff --git a/biometrics/common/aidl/Android.bp b/biometrics/common/aidl/Android.bp
index 246bcf2..854bd4a 100644
--- a/biometrics/common/aidl/Android.bp
+++ b/biometrics/common/aidl/Android.bp
@@ -22,6 +22,12 @@
cpp: {
enabled: false,
},
+ ndk: {
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
+ },
},
versions_with_info: [
{
diff --git a/biometrics/common/config/Android.bp b/biometrics/common/config/Android.bp
index d38ffe8..b86aafa 100644
--- a/biometrics/common/config/Android.bp
+++ b/biometrics/common/config/Android.bp
@@ -22,7 +22,7 @@
// SPDX-license-identifier-Apache-2.0
name: "android.hardware.biometrics.common.config",
export_include_dirs: ["include"],
- vendor: true,
+ vendor_available: true,
srcs: [
"Config.cpp",
],
@@ -30,6 +30,10 @@
"libbase",
"libbinder_ndk",
],
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
}
cc_test_host {
diff --git a/biometrics/common/thread/Android.bp b/biometrics/common/thread/Android.bp
index e7a7e4c..c1ebe3b 100644
--- a/biometrics/common/thread/Android.bp
+++ b/biometrics/common/thread/Android.bp
@@ -10,10 +10,14 @@
// SPDX-license-identifier-Apache-2.0
name: "android.hardware.biometrics.common.thread",
export_include_dirs: ["include"],
- vendor: true,
+ vendor_available: true,
srcs: [
"WorkerThread.cpp",
],
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
}
cc_test_host {
diff --git a/biometrics/common/util/Android.bp b/biometrics/common/util/Android.bp
index 599c491..a0bd211 100644
--- a/biometrics/common/util/Android.bp
+++ b/biometrics/common/util/Android.bp
@@ -6,7 +6,7 @@
// SPDX-license-identifier-Apache-2.0
name: "android.hardware.biometrics.common.util",
export_include_dirs: ["include"],
- vendor: true,
+ vendor_available: true,
srcs: [
"CancellationSignal.cpp",
],
@@ -15,4 +15,8 @@
"libbinder_ndk",
"android.hardware.biometrics.common-V4-ndk",
],
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
}
diff --git a/biometrics/fingerprint/aidl/Android.bp b/biometrics/fingerprint/aidl/Android.bp
index a395c01..c5b9937 100644
--- a/biometrics/fingerprint/aidl/Android.bp
+++ b/biometrics/fingerprint/aidl/Android.bp
@@ -11,7 +11,7 @@
name: "android.hardware.biometrics.fingerprint",
vendor_available: true,
srcs: [
- "android/hardware/biometrics/fingerprint/**/*.aidl",
+ "android/hardware/biometrics/fingerprint/*.aidl",
],
imports: [
"android.hardware.biometrics.common-V4",
@@ -25,6 +25,12 @@
cpp: {
enabled: false,
},
+ ndk: {
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+ },
},
versions_with_info: [
{
@@ -57,5 +63,34 @@
},
],
+ frozen: true,
+}
+
+aidl_interface {
+ name: "android.hardware.biometrics.fingerprint.virtualhal",
+ srcs: [
+ "android/hardware/biometrics/fingerprint/virtualhal/*.aidl",
+ ],
+ imports: [
+ "android.hardware.biometrics.common-V4",
+ "android.hardware.keymaster-V4",
+ "android.hardware.biometrics.fingerprint-V4",
+ ],
+ vendor_available: true,
+ unstable: true,
+ backend: {
+ java: {
+ platform_apis: true,
+ },
+ cpp: {
+ enabled: false,
+ },
+ ndk: {
+ apex_available: [
+ "com.android.hardware.biometrics.fingerprint.virtual",
+ "//apex_available:platform",
+ ],
+ },
+ },
frozen: false,
}
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfoAndVendorCode.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfoAndVendorCode.aidl
deleted file mode 100644
index c1dc51c..0000000
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/AcquiredInfoAndVendorCode.aidl
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// 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 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
-// 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.fingerprint;
-/* @hide */
-@VintfStability
-union AcquiredInfoAndVendorCode {
- android.hardware.biometrics.fingerprint.AcquiredInfo acquiredInfo = android.hardware.biometrics.fingerprint.AcquiredInfo.UNKNOWN;
- int vendorCode;
-}
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/EnrollmentProgressStep.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/EnrollmentProgressStep.aidl
deleted file mode 100644
index 173ac17..0000000
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/EnrollmentProgressStep.aidl
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// 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 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
-// 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.fingerprint;
-/* @hide */
-@VintfStability
-parcelable EnrollmentProgressStep {
- int durationMs;
- android.hardware.biometrics.fingerprint.AcquiredInfoAndVendorCode[] acquiredInfoAndVendorCodes;
-}
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/IVirtualHal.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/IVirtualHal.aidl
deleted file mode 100644
index 33ae83c..0000000
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/IVirtualHal.aidl
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// 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 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
-// 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.fingerprint;
-/* @hide */
-@VintfStability
-interface IVirtualHal {
- oneway void setEnrollments(in int[] id);
- oneway void setEnrollmentHit(in int hit_id);
- oneway void setNextEnrollment(in android.hardware.biometrics.fingerprint.NextEnrollment next_enrollment);
- oneway void setAuthenticatorId(in long id);
- oneway void setChallenge(in long challenge);
- oneway void setOperationAuthenticateFails(in boolean fail);
- oneway void setOperationAuthenticateLatency(in int[] latencyMs);
- oneway void setOperationAuthenticateDuration(in int durationMs);
- oneway void setOperationAuthenticateError(in int error);
- oneway void setOperationAuthenticateAcquired(in android.hardware.biometrics.fingerprint.AcquiredInfoAndVendorCode[] acquired);
- oneway void setOperationEnrollError(in int error);
- oneway void setOperationEnrollLatency(in int[] latencyMs);
- oneway void setOperationDetectInteractionLatency(in int[] latencyMs);
- oneway void setOperationDetectInteractionError(in int error);
- oneway void setOperationDetectInteractionDuration(in int durationMs);
- oneway void setOperationDetectInteractionAcquired(in android.hardware.biometrics.fingerprint.AcquiredInfoAndVendorCode[] acquired);
- oneway void setLockout(in boolean lockout);
- oneway void setLockoutEnable(in boolean enable);
- oneway void setLockoutTimedThreshold(in int threshold);
- oneway void setLockoutTimedDuration(in int durationMs);
- oneway void setLockoutPermanentThreshold(in int threshold);
- oneway void resetConfigurations();
- oneway void setType(in android.hardware.biometrics.fingerprint.FingerprintSensorType type);
- oneway void setSensorId(in int id);
- oneway void setSensorStrength(in android.hardware.biometrics.common.SensorStrength strength);
- oneway void setMaxEnrollmentPerUser(in int max);
- oneway void setSensorLocation(in android.hardware.biometrics.fingerprint.SensorLocation loc);
- oneway void setNavigationGuesture(in boolean v);
- oneway void setDetectInteraction(in boolean v);
- oneway void setDisplayTouch(in boolean v);
- oneway void setControlIllumination(in boolean v);
- const int STATUS_INVALID_PARAMETER = 1;
-}
diff --git a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/NextEnrollment.aidl b/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/NextEnrollment.aidl
deleted file mode 100644
index 75ed070..0000000
--- a/biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/NextEnrollment.aidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// 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 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
-// 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.fingerprint;
-/* @hide */
-@VintfStability
-parcelable NextEnrollment {
- int id;
- android.hardware.biometrics.fingerprint.EnrollmentProgressStep[] progressSteps;
- boolean result = true;
-}
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfoAndVendorCode.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/AcquiredInfoAndVendorCode.aidl
similarity index 93%
rename from biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfoAndVendorCode.aidl
rename to biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/AcquiredInfoAndVendorCode.aidl
index c7be950..1fc7221 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/AcquiredInfoAndVendorCode.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/AcquiredInfoAndVendorCode.aidl
@@ -14,14 +14,13 @@
* limitations under the License.
*/
-package android.hardware.biometrics.fingerprint;
+package android.hardware.biometrics.fingerprint.virtualhal;
import android.hardware.biometrics.fingerprint.AcquiredInfo;
/**
* @hide
*/
-@VintfStability
union AcquiredInfoAndVendorCode {
/**
* Acquired info as specified in AcqauiredInfo.aidl
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/EnrollmentProgressStep.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/EnrollmentProgressStep.aidl
similarity index 87%
rename from biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/EnrollmentProgressStep.aidl
rename to biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/EnrollmentProgressStep.aidl
index bf038f6..b0b2926 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/EnrollmentProgressStep.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/EnrollmentProgressStep.aidl
@@ -14,14 +14,13 @@
* limitations under the License.
*/
-package android.hardware.biometrics.fingerprint;
+package android.hardware.biometrics.fingerprint.virtualhal;
-import android.hardware.biometrics.fingerprint.AcquiredInfoAndVendorCode;
+import android.hardware.biometrics.fingerprint.virtualhal.AcquiredInfoAndVendorCode;
/**
* @hide
*/
-@VintfStability
parcelable EnrollmentProgressStep {
/**
* The duration of the enrollment step in milli-seconds
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/IVirtualHal.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/IVirtualHal.aidl
similarity index 96%
rename from biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/IVirtualHal.aidl
rename to biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/IVirtualHal.aidl
index cb9135e..5af84ed 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/IVirtualHal.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/IVirtualHal.aidl
@@ -14,19 +14,19 @@
* limitations under the License.
*/
-package android.hardware.biometrics.fingerprint;
+package android.hardware.biometrics.fingerprint.virtualhal;
import android.hardware.biometrics.common.SensorStrength;
-import android.hardware.biometrics.fingerprint.AcquiredInfoAndVendorCode;
import android.hardware.biometrics.fingerprint.FingerprintSensorType;
-import android.hardware.biometrics.fingerprint.NextEnrollment;
+import android.hardware.biometrics.fingerprint.IFingerprint;
import android.hardware.biometrics.fingerprint.SensorLocation;
+import android.hardware.biometrics.fingerprint.virtualhal.AcquiredInfoAndVendorCode;
+import android.hardware.biometrics.fingerprint.virtualhal.NextEnrollment;
/**
* @hide
*/
-@VintfStability
-oneway interface IVirtualHal {
+interface IVirtualHal {
/**
* The operation failed due to invalid input parameters, the error messages should
* gives more details
@@ -315,4 +315,5 @@
void setDetectInteraction(in boolean v);
void setDisplayTouch(in boolean v);
void setControlIllumination(in boolean v);
+ IFingerprint getFingerprintHal();
}
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/NextEnrollment.aidl b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/NextEnrollment.aidl
similarity index 85%
rename from biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/NextEnrollment.aidl
rename to biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/NextEnrollment.aidl
index 4b50850..2d704f1 100644
--- a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/NextEnrollment.aidl
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/NextEnrollment.aidl
@@ -14,12 +14,13 @@
* limitations under the License.
*/
-package android.hardware.biometrics.fingerprint;
+package android.hardware.biometrics.fingerprint.virtualhal;
+
+import android.hardware.biometrics.fingerprint.virtualhal.EnrollmentProgressStep;
/**
* @hide
*/
-@VintfStability
parcelable NextEnrollment {
/**
* Identifier of the next enrollment if successful
@@ -31,7 +32,7 @@
* and sequence of acquired info codes to be generated by HAL.
* See EnrollmentProgressStep.aidl for more details
*/
- android.hardware.biometrics.fingerprint.EnrollmentProgressStep[] progressSteps;
+ EnrollmentProgressStep[] progressSteps;
/**
* Success or failure of the next enrollment
diff --git a/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/README.md b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/README.md
new file mode 100644
index 0000000..eaf2336
--- /dev/null
+++ b/biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/virtualhal/README.md
@@ -0,0 +1,2 @@
+The aidl files in this directory are used only by fingerprint virtual hal
+which is controlled/configured via IVirtualHal interface
diff --git a/biometrics/fingerprint/aidl/default/Android.bp b/biometrics/fingerprint/aidl/default/Android.bp
index 9b72c87..faaa9c6 100644
--- a/biometrics/fingerprint/aidl/default/Android.bp
+++ b/biometrics/fingerprint/aidl/default/Android.bp
@@ -8,10 +8,9 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
-cc_binary {
- name: "android.hardware.biometrics.fingerprint-service.example",
- vendor: true,
- relative_install_path: "hw",
+cc_library_static {
+ name: "android.hardware.biometrics.fingerprint-service.lib",
+ vendor_available: true,
local_include_dirs: ["include"],
srcs: [
"FakeLockoutTracker.cpp",
@@ -30,22 +29,80 @@
"libbinder_ndk",
"liblog",
],
- static_libs: [
+ whole_static_libs: [
"libandroid.hardware.biometrics.fingerprint.VirtualProps",
"libbase",
- "android.hardware.biometrics.fingerprint-V5-ndk",
+ "android.hardware.biometrics.fingerprint.virtualhal-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
"android.hardware.biometrics.common-V4-ndk",
"android.hardware.biometrics.common.thread",
"android.hardware.biometrics.common.util",
"android.hardware.biometrics.common.config",
"android.hardware.keymaster-V4-ndk",
],
+ product_variables: {
+ debuggable: {
+ cflags: ["-DFPS_DEBUGGABLE"],
+ },
+ },
+ apex_available: [
+ "com.android.hardware.biometrics.fingerprint.virtual",
+ "//apex_available:platform",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.biometrics.fingerprint-service.example",
+ system_ext_specific: true,
+ relative_install_path: "hw",
+ local_include_dirs: ["include"],
+ srcs: [
+ ],
+ stl: "c++_static",
+ shared_libs: [
+ "libbinder_ndk",
+ "liblog",
+ ],
+ whole_static_libs: [
+ "android.hardware.biometrics.fingerprint-service.lib",
+ ],
installable: false, // install APEX instead
product_variables: {
debuggable: {
cflags: ["-DFPS_DEBUGGABLE"],
},
},
+ apex_available: [
+ "com.android.hardware.biometrics.fingerprint.virtual",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.biometrics.fingerprint-service.default",
+ //system_ext_specific: true,
+ vendor: true,
+ relative_install_path: "hw",
+ init_rc: ["fingerprint-default.rc"],
+ vintf_fragments: ["fingerprint-default.xml"],
+ local_include_dirs: ["include"],
+ srcs: [
+ ],
+ stl: "c++_static",
+ shared_libs: [
+ "libbinder_ndk",
+ "liblog",
+ ],
+ whole_static_libs: [
+ "android.hardware.biometrics.fingerprint-service.lib",
+ ],
+ product_variables: {
+ debuggable: {
+ cflags: ["-DFPS_DEBUGGABLE"],
+ },
+ },
+ apex_available: [
+ "//apex_available:platform",
+ ],
}
cc_test {
@@ -63,14 +120,13 @@
],
static_libs: [
"libandroid.hardware.biometrics.fingerprint.VirtualProps",
- "android.hardware.biometrics.fingerprint-V5-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
"android.hardware.biometrics.common-V4-ndk",
"android.hardware.keymaster-V4-ndk",
"android.hardware.biometrics.common.util",
"android.hardware.biometrics.common.config",
"android.hardware.biometrics.common.thread",
],
- vendor: true,
test_suites: ["general-tests"],
require_root: true,
}
@@ -91,14 +147,13 @@
],
static_libs: [
"libandroid.hardware.biometrics.fingerprint.VirtualProps",
- "android.hardware.biometrics.fingerprint-V5-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
"android.hardware.biometrics.common-V4-ndk",
"android.hardware.keymaster-V4-ndk",
"android.hardware.biometrics.common.util",
"android.hardware.biometrics.common.config",
"android.hardware.biometrics.common.thread",
],
- vendor: true,
test_suites: ["general-tests"],
require_root: true,
}
@@ -117,14 +172,13 @@
],
static_libs: [
"libandroid.hardware.biometrics.fingerprint.VirtualProps",
- "android.hardware.biometrics.fingerprint-V5-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
"android.hardware.biometrics.common-V4-ndk",
"android.hardware.keymaster-V4-ndk",
"android.hardware.biometrics.common.util",
"android.hardware.biometrics.common.thread",
"android.hardware.biometrics.common.config",
],
- vendor: true,
test_suites: ["general-tests"],
require_root: true,
}
@@ -145,14 +199,13 @@
],
static_libs: [
"libandroid.hardware.biometrics.fingerprint.VirtualProps",
- "android.hardware.biometrics.fingerprint-V5-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
"android.hardware.biometrics.common-V4-ndk",
"android.hardware.keymaster-V4-ndk",
"android.hardware.biometrics.common.util",
"android.hardware.biometrics.common.thread",
"android.hardware.biometrics.common.config",
],
- vendor: true,
test_suites: ["general-tests"],
require_root: true,
}
@@ -178,7 +231,8 @@
],
static_libs: [
"libandroid.hardware.biometrics.fingerprint.VirtualProps",
- "android.hardware.biometrics.fingerprint-V5-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
+ "android.hardware.biometrics.fingerprint.virtualhal-ndk",
"android.hardware.biometrics.common-V4-ndk",
"android.hardware.keymaster-V4-ndk",
"android.hardware.biometrics.common.util",
@@ -190,7 +244,6 @@
cflags: ["-DFPS_DEBUGGABLE"],
},
},
- vendor: true,
test_suites: ["general-tests"],
require_root: true,
}
@@ -198,39 +251,34 @@
sysprop_library {
name: "android.hardware.biometrics.fingerprint.VirtualProps",
srcs: ["fingerprint.sysprop"],
- property_owner: "Vendor",
- vendor: true,
+ property_owner: "Platform",
+ vendor_available: true,
+ apex_available: [
+ "com.android.hardware.biometrics.fingerprint.virtual",
+ "//apex_available:platform",
+ ],
}
prebuilt_etc {
- name: "fingerprint-example.rc",
- src: "fingerprint-example.rc",
- installable: false,
-}
-
-prebuilt_etc {
- name: "fingerprint-example.xml",
- src: "fingerprint-example.xml",
- sub_dir: "vintf",
+ name: "fingerprint-virtual.rc",
+ src: "fingerprint-virtual.rc",
installable: false,
}
apex {
name: "com.android.hardware.biometrics.fingerprint.virtual",
manifest: "apex_manifest.json",
- file_contexts: "apex_file_contexts",
+ file_contexts: ":com.android.biometrics.virtual.fingerprint-file_contexts",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
- vendor: true,
+ system_ext_specific: true,
binaries: [
"android.hardware.biometrics.fingerprint-service.example",
],
prebuilts: [
// init_rc
- "fingerprint-example.rc",
- // vintf_fragment
- "fingerprint-example.xml",
+ "fingerprint-virtual.rc",
],
}
diff --git a/biometrics/fingerprint/aidl/default/VirtualHal.cpp b/biometrics/fingerprint/aidl/default/VirtualHal.cpp
index e107d2f..d161765 100644
--- a/biometrics/fingerprint/aidl/default/VirtualHal.cpp
+++ b/biometrics/fingerprint/aidl/default/VirtualHal.cpp
@@ -26,7 +26,7 @@
#define LOG_TAG "FingerprintVirtualHalAidl"
namespace aidl::android::hardware::biometrics::fingerprint {
-
+using AcquiredInfoAndVendorCode = virtualhal::AcquiredInfoAndVendorCode;
using Tag = AcquiredInfoAndVendorCode::Tag;
::ndk::ScopedAStatus VirtualHal::setEnrollments(const std::vector<int32_t>& enrollments) {
@@ -41,8 +41,7 @@
return ndk::ScopedAStatus::ok();
}
-::ndk::ScopedAStatus VirtualHal::setNextEnrollment(
- const ::aidl::android::hardware::biometrics::fingerprint::NextEnrollment& next_enrollment) {
+::ndk::ScopedAStatus VirtualHal::setNextEnrollment(const NextEnrollment& next_enrollment) {
Fingerprint::cfg().sourcedFromAidl();
std::ostringstream os;
os << next_enrollment.id << ":";
@@ -333,4 +332,10 @@
return ndk::ScopedAStatus::ok();
}
+::ndk::ScopedAStatus VirtualHal::getFingerprintHal(
+ std::shared_ptr<::aidl::android::hardware::biometrics::fingerprint::IFingerprint>* pFp) {
+ LOG(INFO) << " calling getFingerprintHal in VirtualHal.cpp";
+ *pFp = mFp;
+ return ndk::ScopedAStatus::ok();
+}
} // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt b/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
index e69de29..8c02a68 100644
--- a/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
+++ b/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
@@ -0,0 +1,178 @@
+props {
+ owner: Vendor
+ module: "android.fingerprint.virt.FingerprintHalProperties"
+ prop {
+ api_name: "authenticator_id"
+ type: Long
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.authenticator_id"
+ }
+ prop {
+ api_name: "challenge"
+ type: Long
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.challenge"
+ }
+ prop {
+ api_name: "control_illumination"
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.udfps.control_illumination"
+ }
+ prop {
+ api_name: "detect_interaction"
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.detect_interaction"
+ }
+ prop {
+ api_name: "display_touch"
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.udfps.display_touch"
+ }
+ prop {
+ api_name: "enrollment_hit"
+ type: Integer
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.enrollment_hit"
+ }
+ prop {
+ api_name: "enrollments"
+ type: IntegerList
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.enrollments"
+ }
+ prop {
+ api_name: "lockout"
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.lockout"
+ }
+ prop {
+ api_name: "lockout_enable"
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.lockout_enable"
+ }
+ prop {
+ api_name: "lockout_permanent_threshold"
+ type: Integer
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.lockout_permanent_threshold"
+ }
+ prop {
+ api_name: "lockout_timed_duration"
+ type: Integer
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.lockout_timed_duration"
+ }
+ prop {
+ api_name: "lockout_timed_threshold"
+ type: Integer
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.lockout_timed_threshold"
+ }
+ prop {
+ api_name: "max_enrollments"
+ type: Integer
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.max_enrollments"
+ }
+ prop {
+ api_name: "navigation_guesture"
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.navigation_guesture"
+ }
+ prop {
+ api_name: "next_enrollment"
+ type: String
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.next_enrollment"
+ }
+ prop {
+ api_name: "operation_authenticate_acquired"
+ type: String
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_authenticate_acquired"
+ }
+ prop {
+ api_name: "operation_authenticate_duration"
+ type: Integer
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_authenticate_duration"
+ }
+ prop {
+ api_name: "operation_authenticate_error"
+ type: Integer
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_authenticate_error"
+ }
+ prop {
+ api_name: "operation_authenticate_fails"
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_authenticate_fails"
+ }
+ prop {
+ api_name: "operation_authenticate_latency"
+ type: IntegerList
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_authenticate_latency"
+ }
+ prop {
+ api_name: "operation_detect_interaction_acquired"
+ type: String
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_acquired"
+ }
+ prop {
+ api_name: "operation_detect_interaction_duration"
+ type: Integer
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_duration"
+ }
+ prop {
+ api_name: "operation_detect_interaction_error"
+ type: Integer
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_error"
+ }
+ prop {
+ api_name: "operation_detect_interaction_latency"
+ type: IntegerList
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_latency"
+ }
+ prop {
+ api_name: "operation_enroll_error"
+ type: Integer
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_enroll_error"
+ }
+ prop {
+ api_name: "operation_enroll_latency"
+ type: IntegerList
+ access: ReadWrite
+ prop_name: "vendor.fingerprint.virtual.operation_enroll_latency"
+ }
+ prop {
+ api_name: "sensor_id"
+ type: Integer
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.sensor_id"
+ }
+ prop {
+ api_name: "sensor_location"
+ type: String
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.sensor_location"
+ }
+ prop {
+ api_name: "sensor_strength"
+ type: Integer
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.sensor_strength"
+ }
+ prop {
+ api_name: "type"
+ type: String
+ access: ReadWrite
+ prop_name: "persist.vendor.fingerprint.virtual.type"
+ enum_values: "default|rear|udfps|side"
+ }
+}
diff --git a/biometrics/fingerprint/aidl/default/fingerprint-default.rc b/biometrics/fingerprint/aidl/default/fingerprint-default.rc
new file mode 100644
index 0000000..7e46bc1
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/fingerprint-default.rc
@@ -0,0 +1,7 @@
+service vendor.fingerprint-default /vendor/bin/hw/android.hardware.biometrics.fingerprint-service.default default
+ class hal
+ user nobody
+ group nobody
+ interface aidl android.hardware.biometrics.fingerprint.IFingerprint/default
+ oneshot
+ disabled
diff --git a/biometrics/fingerprint/aidl/default/fingerprint-default.xml b/biometrics/fingerprint/aidl/default/fingerprint-default.xml
new file mode 100644
index 0000000..d140459
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/fingerprint-default.xml
@@ -0,0 +1,10 @@
+<manifest version="1.0" type="device">
+ <hal format="aidl">
+ <name>android.hardware.biometrics.fingerprint</name>
+ <version>4</version>
+ <interface>
+ <name>IFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/biometrics/fingerprint/aidl/default/fingerprint-example.rc b/biometrics/fingerprint/aidl/default/fingerprint-example.rc
deleted file mode 100644
index da4ea45..0000000
--- a/biometrics/fingerprint/aidl/default/fingerprint-example.rc
+++ /dev/null
@@ -1,7 +0,0 @@
-service vendor.fingerprint-example /apex/com.android.hardware.biometrics.fingerprint.virtual/bin/hw/android.hardware.biometrics.fingerprint-service.example
- class hal
- user nobody
- group nobody
- interface aidl android.hardware.biometrics.fingerprint.IFingerprint/virtual
- oneshot
- disabled
diff --git a/biometrics/fingerprint/aidl/default/fingerprint-example.xml b/biometrics/fingerprint/aidl/default/fingerprint-example.xml
deleted file mode 100644
index ee529e9..0000000
--- a/biometrics/fingerprint/aidl/default/fingerprint-example.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<manifest version="1.0" type="device">
- <hal format="aidl">
- <name>android.hardware.biometrics.fingerprint</name>
- <version>5</version>
- <fqname>IFingerprint/virtual</fqname>
- </hal>
-</manifest>
diff --git a/biometrics/fingerprint/aidl/default/fingerprint-virtual.rc b/biometrics/fingerprint/aidl/default/fingerprint-virtual.rc
new file mode 100644
index 0000000..5d1506c
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/fingerprint-virtual.rc
@@ -0,0 +1,7 @@
+service fingerprint-virtual /apex/com.android.hardware.biometrics.fingerprint.virtual/bin/hw/android.hardware.biometrics.fingerprint-service.example virtual
+ class hal
+ user nobody
+ group nobody
+ interface aidl android.hardware.biometrics.fingerprint.virtualhal.IVirtualHal/virtual
+ oneshot
+ disabled
diff --git a/biometrics/fingerprint/aidl/default/fingerprint.sysprop b/biometrics/fingerprint/aidl/default/fingerprint.sysprop
index 6a6c297..eb33432 100644
--- a/biometrics/fingerprint/aidl/default/fingerprint.sysprop
+++ b/biometrics/fingerprint/aidl/default/fingerprint.sysprop
@@ -7,7 +7,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.type"
type: String
- scope: Internal
+ scope: Public
access: ReadWrite
enum_values: "default|rear|udfps|side"
api_name: "type"
@@ -17,7 +17,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.enrollments"
type: IntegerList
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "enrollments"
}
@@ -27,7 +27,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.enrollment_hit"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "enrollment_hit"
}
@@ -42,7 +42,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.next_enrollment"
type: String
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "next_enrollment"
}
@@ -51,7 +51,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.authenticator_id"
type: Long
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "authenticator_id"
}
@@ -60,7 +60,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.challenge"
type: Long
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "challenge"
}
@@ -69,7 +69,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_authenticate_fails"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_authenticate_fails"
}
@@ -82,7 +82,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_error"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_detect_interaction_error"
}
@@ -91,7 +91,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_enroll_error"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_enroll_error"
}
@@ -104,7 +104,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_authenticate_latency"
type: IntegerList
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_authenticate_latency"
}
@@ -114,7 +114,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_latency"
type: IntegerList
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_detect_interaction_latency"
}
@@ -124,7 +124,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_enroll_latency"
type: IntegerList
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_enroll_latency"
}
@@ -134,7 +134,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_authenticate_duration"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_authenticate_duration"
}
@@ -143,7 +143,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_authenticate_error"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_authenticate_error"
}
@@ -153,7 +153,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.sensor_location"
type: String
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "sensor_location"
}
@@ -162,7 +162,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_authenticate_acquired"
type: String
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_authenticate_acquired"
}
@@ -172,7 +172,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_duration"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_detect_interaction_duration"
}
@@ -184,7 +184,7 @@
prop {
prop_name: "vendor.fingerprint.virtual.operation_detect_interaction_acquired"
type: String
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "operation_detect_interaction_acquired"
}
@@ -193,7 +193,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.sensor_id"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "sensor_id"
}
@@ -203,7 +203,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.sensor_strength"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "sensor_strength"
}
@@ -213,7 +213,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.max_enrollments"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "max_enrollments"
}
@@ -222,7 +222,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.navigation_guesture"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "navigation_guesture"
}
@@ -231,7 +231,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.detect_interaction"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "detect_interaction"
}
@@ -240,7 +240,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.udfps.display_touch"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "display_touch"
}
@@ -249,7 +249,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.udfps.control_illumination"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "control_illumination"
}
@@ -258,7 +258,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.lockout"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "lockout"
}
@@ -267,7 +267,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.lockout_enable"
type: Boolean
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "lockout_enable"
}
@@ -276,7 +276,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.lockout_timed_threshold"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "lockout_timed_threshold"
}
@@ -285,7 +285,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.lockout_timed_duration"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "lockout_timed_duration"
}
@@ -294,7 +294,7 @@
prop {
prop_name: "persist.vendor.fingerprint.virtual.lockout_permanent_threshold"
type: Integer
- scope: Internal
+ scope: Public
access: ReadWrite
api_name: "lockout_permanent_threshold"
}
diff --git a/biometrics/fingerprint/aidl/default/include/VirtualHal.h b/biometrics/fingerprint/aidl/default/include/VirtualHal.h
index e5f62fc..5488383 100644
--- a/biometrics/fingerprint/aidl/default/include/VirtualHal.h
+++ b/biometrics/fingerprint/aidl/default/include/VirtualHal.h
@@ -16,21 +16,21 @@
#pragma once
-#include <aidl/android/hardware/biometrics/fingerprint/BnVirtualHal.h>
+#include <aidl/android/hardware/biometrics/fingerprint/virtualhal/BnVirtualHal.h>
#include "Fingerprint.h"
namespace aidl::android::hardware::biometrics::fingerprint {
+using namespace virtualhal;
+
class VirtualHal : public BnVirtualHal {
public:
- VirtualHal(Fingerprint* fp) : mFp(fp) {}
+ VirtualHal(std::shared_ptr<Fingerprint> fp) : mFp(fp) {}
::ndk::ScopedAStatus setEnrollments(const std::vector<int32_t>& in_id) override;
::ndk::ScopedAStatus setEnrollmentHit(int32_t in_hit_id) override;
- ::ndk::ScopedAStatus setNextEnrollment(
- const ::aidl::android::hardware::biometrics::fingerprint::NextEnrollment&
- in_next_enrollment) override;
+ ::ndk::ScopedAStatus setNextEnrollment(const NextEnrollment& in_next_enrollment) override;
::ndk::ScopedAStatus setAuthenticatorId(int64_t in_id) override;
::ndk::ScopedAStatus setChallenge(int64_t in_challenge) override;
::ndk::ScopedAStatus setOperationAuthenticateFails(bool in_fail) override;
@@ -67,12 +67,15 @@
::ndk::ScopedAStatus setDetectInteraction(bool in_v) override;
::ndk::ScopedAStatus setDisplayTouch(bool in_v) override;
::ndk::ScopedAStatus setControlIllumination(bool in_v) override;
+ ::ndk::ScopedAStatus getFingerprintHal(
+ std::shared_ptr<::aidl::android::hardware::biometrics::fingerprint::IFingerprint>*
+ _aidl_return);
private:
OptIntVec intVec2OptIntVec(const std::vector<int32_t>& intVec);
OptIntVec acquiredInfoVec2OptIntVec(const std::vector<AcquiredInfoAndVendorCode>& intVec);
::ndk::ScopedAStatus sanityCheckLatency(const std::vector<int32_t>& in_latency);
- Fingerprint* mFp;
+ std::shared_ptr<Fingerprint> mFp;
};
} // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/main.cpp b/biometrics/fingerprint/aidl/default/main.cpp
index ba0c8ec..8ca44d6 100644
--- a/biometrics/fingerprint/aidl/default/main.cpp
+++ b/biometrics/fingerprint/aidl/default/main.cpp
@@ -24,21 +24,38 @@
using aidl::android::hardware::biometrics::fingerprint::Fingerprint;
using aidl::android::hardware::biometrics::fingerprint::VirtualHal;
-int main() {
- LOG(INFO) << "Fingerprint HAL started";
+int main(int argc, char** argv) {
+ if (argc < 2) {
+ LOG(ERROR) << "Missing argument -> exiting";
+ return EXIT_FAILURE;
+ }
+
+ LOG(INFO) << "Fingerprint HAL started: " << argv[1];
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<Fingerprint> hal = ndk::SharedRefBase::make<Fingerprint>();
- auto binder = hal->asBinder();
-
- std::shared_ptr<VirtualHal> hal_ext = ndk::SharedRefBase::make<VirtualHal>(hal.get());
- auto binder_ext = hal_ext->asBinder();
+ std::shared_ptr<VirtualHal> hal_vhal = ndk::SharedRefBase::make<VirtualHal>(hal);
if (hal->connected()) {
- CHECK(STATUS_OK == AIBinder_setExtension(binder.get(), binder_ext.get()));
- const std::string instance = std::string(Fingerprint::descriptor) + "/virtual";
- binder_status_t status =
- AServiceManager_registerLazyService(binder.get(), instance.c_str());
- CHECK_EQ(status, STATUS_OK);
+ if (strcmp(argv[1], "default") == 0) {
+ const std::string instance = std::string(Fingerprint::descriptor) + "/default";
+ auto binder = hal->asBinder();
+ auto binder_ext = hal_vhal->asBinder();
+ CHECK(STATUS_OK == AIBinder_setExtension(binder.get(), binder_ext.get()));
+ binder_status_t status =
+ AServiceManager_registerLazyService(binder.get(), instance.c_str());
+ CHECK_EQ(status, STATUS_OK);
+ LOG(INFO) << "started IFingerprint/default";
+ } else if (strcmp(argv[1], "virtual") == 0) {
+ const std::string instance = std::string(VirtualHal::descriptor) + "/virtual";
+ auto binder = hal_vhal->asBinder();
+ binder_status_t status =
+ AServiceManager_registerLazyService(binder.get(), instance.c_str());
+ CHECK_EQ(status, STATUS_OK);
+ LOG(INFO) << "started IVirtualHal/virtual";
+ } else {
+ LOG(ERROR) << "Unexpected argument: " << argv[1];
+ return EXIT_FAILURE;
+ }
AServiceManager_forceLazyServicesPersist(true);
} else {
LOG(ERROR) << "Fingerprint HAL is not connected";
diff --git a/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp b/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
index 3fe0b2a..8ffc96b 100644
--- a/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
+++ b/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
@@ -35,7 +35,7 @@
protected:
void SetUp() override {
mHal = ndk::SharedRefBase::make<Fingerprint>();
- mVhal = ndk::SharedRefBase::make<VirtualHal>(mHal.get());
+ mVhal = ndk::SharedRefBase::make<VirtualHal>(mHal);
ASSERT_TRUE(mVhal != nullptr);
mHal->resetConfigToDefault();
}
diff --git a/biometrics/fingerprint/aidl/vts/Android.bp b/biometrics/fingerprint/aidl/vts/Android.bp
index fc32fe6..628f03f 100644
--- a/biometrics/fingerprint/aidl/vts/Android.bp
+++ b/biometrics/fingerprint/aidl/vts/Android.bp
@@ -16,8 +16,8 @@
],
srcs: ["VtsHalBiometricsFingerprintTargetTest.cpp"],
static_libs: [
- "android.hardware.biometrics.common-V3-ndk",
- "android.hardware.biometrics.fingerprint-V3-ndk",
+ "android.hardware.biometrics.common-V4-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
"android.hardware.keymaster-V4-ndk",
],
shared_libs: [
diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
index ad8d4c8..e0e3a0e 100644
--- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
+++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
@@ -288,77 +288,70 @@
}
TEST_P(CameraAidlTest, getSessionCharacteristics) {
- if (flags::feature_combination_query()) {
- std::vector<std::string> cameraDeviceNames = getCameraDeviceNames(mProvider);
+ std::vector<std::string> cameraDeviceNames = getCameraDeviceNames(mProvider);
- for (const auto& name : cameraDeviceNames) {
- std::shared_ptr<ICameraDevice> device;
- ALOGI("getSessionCharacteristics: Testing camera device %s", name.c_str());
- ndk::ScopedAStatus ret = mProvider->getCameraDeviceInterface(name, &device);
- ALOGI("getCameraDeviceInterface returns: %d:%d", ret.getExceptionCode(),
- ret.getServiceSpecificError());
- ASSERT_TRUE(ret.isOk());
- ASSERT_NE(device, nullptr);
+ for (const auto& name : cameraDeviceNames) {
+ std::shared_ptr<ICameraDevice> device;
+ ALOGI("getSessionCharacteristics: Testing camera device %s", name.c_str());
+ ndk::ScopedAStatus ret = mProvider->getCameraDeviceInterface(name, &device);
+ ALOGI("getCameraDeviceInterface returns: %d:%d", ret.getExceptionCode(),
+ ret.getServiceSpecificError());
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_NE(device, nullptr);
- int32_t interfaceVersion = -1;
- ret = device->getInterfaceVersion(&interfaceVersion);
- ASSERT_TRUE(ret.isOk());
- bool supportSessionCharacteristics =
- (interfaceVersion >= CAMERA_DEVICE_API_MINOR_VERSION_3);
- if (!supportSessionCharacteristics) {
- continue;
- }
-
- CameraMetadata meta;
- openEmptyDeviceSession(name, mProvider, &mSession /*out*/, &meta /*out*/,
- &device /*out*/);
-
- std::vector<AvailableStream> outputStreams;
- camera_metadata_t* staticMeta =
- reinterpret_cast<camera_metadata_t*>(meta.metadata.data());
- outputStreams.clear();
- ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta, outputStreams));
- ASSERT_NE(0u, outputStreams.size());
-
- AvailableStream sampleStream = outputStreams[0];
-
- int32_t streamId = 0;
- Stream stream = {streamId,
- StreamType::OUTPUT,
- sampleStream.width,
- sampleStream.height,
- static_cast<PixelFormat>(sampleStream.format),
- static_cast<aidl::android::hardware::graphics::common::BufferUsage>(
- GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER),
- Dataspace::UNKNOWN,
- StreamRotation::ROTATION_0,
- std::string(),
- /*bufferSize*/ 0,
- /*groupId*/ -1,
- {SensorPixelMode::ANDROID_SENSOR_PIXEL_MODE_DEFAULT},
- RequestAvailableDynamicRangeProfilesMap::
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD};
-
- std::vector<Stream> streams = {stream};
- StreamConfiguration config;
- createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE, &config);
-
- CameraMetadata camera_chars;
- ret = device->getCameraCharacteristics(&camera_chars);
- ASSERT_TRUE(ret.isOk());
-
- CameraMetadata session_chars;
- ret = device->getSessionCharacteristics(config, &session_chars);
- ASSERT_TRUE(ret.isOk());
- verifySessionCharacteristics(session_chars, camera_chars);
-
- ret = mSession->close();
- mSession = nullptr;
- ASSERT_TRUE(ret.isOk());
+ int32_t interfaceVersion = -1;
+ ret = device->getInterfaceVersion(&interfaceVersion);
+ ASSERT_TRUE(ret.isOk());
+ bool supportSessionCharacteristics =
+ (interfaceVersion >= CAMERA_DEVICE_API_MINOR_VERSION_3);
+ if (!supportSessionCharacteristics) {
+ continue;
}
- } else {
- ALOGI("getSessionCharacteristics: Test skipped.\n");
- GTEST_SKIP();
+
+ CameraMetadata meta;
+ openEmptyDeviceSession(name, mProvider, &mSession /*out*/, &meta /*out*/, &device /*out*/);
+
+ std::vector<AvailableStream> outputStreams;
+ camera_metadata_t* staticMeta = reinterpret_cast<camera_metadata_t*>(meta.metadata.data());
+ outputStreams.clear();
+ ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta, outputStreams));
+ ASSERT_NE(0u, outputStreams.size());
+
+ AvailableStream sampleStream = outputStreams[0];
+
+ int32_t streamId = 0;
+ Stream stream = {streamId,
+ StreamType::OUTPUT,
+ sampleStream.width,
+ sampleStream.height,
+ static_cast<PixelFormat>(sampleStream.format),
+ static_cast<aidl::android::hardware::graphics::common::BufferUsage>(
+ GRALLOC1_CONSUMER_USAGE_VIDEO_ENCODER),
+ Dataspace::UNKNOWN,
+ StreamRotation::ROTATION_0,
+ std::string(),
+ /*bufferSize*/ 0,
+ /*groupId*/ -1,
+ {SensorPixelMode::ANDROID_SENSOR_PIXEL_MODE_DEFAULT},
+ RequestAvailableDynamicRangeProfilesMap::
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD};
+
+ std::vector<Stream> streams = {stream};
+ StreamConfiguration config;
+ createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE, &config);
+
+ CameraMetadata camera_chars;
+ ret = device->getCameraCharacteristics(&camera_chars);
+ ASSERT_TRUE(ret.isOk());
+
+ CameraMetadata session_chars;
+ ret = device->getSessionCharacteristics(config, &session_chars);
+ ASSERT_TRUE(ret.isOk());
+ verifySessionCharacteristics(session_chars, camera_chars);
+
+ ret = mSession->close();
+ mSession = nullptr;
+ ASSERT_TRUE(ret.isOk());
}
}
@@ -615,19 +608,17 @@
ASSERT_EQ(0u, rawMetadata.metadata.size());
}
- if (flags::feature_combination_query()) {
- if (supportFeatureCombinationQuery) {
- CameraMetadata rawMetadata2;
- ndk::ScopedAStatus ret2 =
- device->constructDefaultRequestSettings(reqTemplate, &rawMetadata2);
+ if (supportFeatureCombinationQuery) {
+ CameraMetadata rawMetadata2;
+ ndk::ScopedAStatus ret2 =
+ device->constructDefaultRequestSettings(reqTemplate, &rawMetadata2);
- ASSERT_EQ(ret.isOk(), ret2.isOk());
- ASSERT_EQ(ret.getStatus(), ret2.getStatus());
+ ASSERT_EQ(ret.isOk(), ret2.isOk());
+ ASSERT_EQ(ret.getStatus(), ret2.getStatus());
- ASSERT_EQ(rawMetadata.metadata.size(), rawMetadata2.metadata.size());
- if (ret2.isOk()) {
- validateDefaultRequestMetadata(reqTemplate, rawMetadata2);
- }
+ ASSERT_EQ(rawMetadata.metadata.size(), rawMetadata2.metadata.size());
+ if (ret2.isOk()) {
+ validateDefaultRequestMetadata(reqTemplate, rawMetadata2);
}
}
}
diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index f905011..6ecd451 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -1920,28 +1920,22 @@
ASSERT_TRUE(ret.isOk());
ASSERT_EQ(expectedStatus, streamCombinationSupported);
- if (flags::feature_combination_query()) {
- int32_t interfaceVersion;
- ret = device->getInterfaceVersion(&interfaceVersion);
+ int32_t interfaceVersion;
+ ret = device->getInterfaceVersion(&interfaceVersion);
+ ASSERT_TRUE(ret.isOk());
+ bool supportFeatureCombinationQuery =
+ (interfaceVersion >= CAMERA_DEVICE_API_MINOR_VERSION_3);
+ if (supportFeatureCombinationQuery) {
+ ret = device->isStreamCombinationWithSettingsSupported(config,
+ &streamCombinationSupported);
ASSERT_TRUE(ret.isOk());
- bool supportFeatureCombinationQuery =
- (interfaceVersion >= CAMERA_DEVICE_API_MINOR_VERSION_3);
- if (supportFeatureCombinationQuery) {
- ret = device->isStreamCombinationWithSettingsSupported(config,
- &streamCombinationSupported);
- ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(expectedStatus, streamCombinationSupported);
- }
+ ASSERT_EQ(expectedStatus, streamCombinationSupported);
}
}
}
void CameraAidlTest::verifySessionCharacteristics(const CameraMetadata& session_chars,
const CameraMetadata& camera_chars) {
- if (!flags::feature_combination_query()) {
- return;
- }
-
const camera_metadata_t* session_metadata =
reinterpret_cast<const camera_metadata_t*>(session_chars.metadata.data());
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index 9b7866c..ed45c1b 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -662,7 +662,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.wifi.hostapd</name>
- <version>1-2</version>
+ <version>2-3</version>
<interface>
<name>IHostapd</name>
<instance>default</instance>
diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp
index b86f399..e7a31e6 100644
--- a/compatibility_matrices/exclude/fcm_exclude.cpp
+++ b/compatibility_matrices/exclude/fcm_exclude.cpp
@@ -149,6 +149,7 @@
"android.hardware.radio@",
"android.hardware.uwb.fira_android@",
"android.hardware.wifi.common@",
+ "android.hardware.biometrics.fingerprint.virtualhal@",
// Test packages are exempted.
"android.hardware.tests.",
diff --git a/drm/common/aidl/Android.bp b/drm/common/aidl/Android.bp
index 1e4b8e0..c5cb441 100644
--- a/drm/common/aidl/Android.bp
+++ b/drm/common/aidl/Android.bp
@@ -9,6 +9,7 @@
aidl_interface {
name: "android.hardware.drm.common",
+ host_supported: true,
vendor_available: true,
srcs: ["android/hardware/drm/*.aidl"],
stability: "vintf",
@@ -22,6 +23,9 @@
ndk: {
min_sdk_version: "34",
},
+ rust: {
+ enabled: true,
+ },
},
double_loadable: true,
versions_with_info: [
diff --git a/gnss/aidl/vts/gnss_hal_test.cpp b/gnss/aidl/vts/gnss_hal_test.cpp
index 5e2cbe3..6d5a9a2 100644
--- a/gnss/aidl/vts/gnss_hal_test.cpp
+++ b/gnss/aidl/vts/gnss_hal_test.cpp
@@ -276,29 +276,35 @@
}
/*
- * FindStrongFrequentNonGpsSource:
+ * FindStrongFrequentBlockableSource:
*
- * Search through a GnssSvStatus list for the strongest non-GPS satellite observed enough times
+ * Search through a GnssSvStatus list for the strongest blockable satellite observed enough times
*
* returns the strongest source,
* or a source with constellation == UNKNOWN if none are found sufficient times
*/
-BlocklistedSource GnssHalTest::FindStrongFrequentNonGpsSource(
+BlocklistedSource GnssHalTest::FindStrongFrequentBlockableSource(
const std::list<hidl_vec<IGnssCallback_2_1::GnssSvInfo>> sv_info_list,
const int min_observations) {
- return FindStrongFrequentNonGpsSource(convertToAidl(sv_info_list), min_observations);
+ return FindStrongFrequentBlockableSource(convertToAidl(sv_info_list), min_observations);
}
-BlocklistedSource GnssHalTest::FindStrongFrequentNonGpsSource(
+BlocklistedSource GnssHalTest::FindStrongFrequentBlockableSource(
const std::list<std::vector<IGnssCallback::GnssSvInfo>> sv_info_list,
const int min_observations) {
std::map<ComparableBlocklistedSource, SignalCounts> mapSignals;
+ bool isCnBuild = Utils::isCnBuild();
+ ALOGD("isCnBuild: %s", isCnBuild ? "true" : "false");
for (const auto& sv_info_vec : sv_info_list) {
for (uint32_t iSv = 0; iSv < sv_info_vec.size(); iSv++) {
const auto& gnss_sv = sv_info_vec[iSv];
if ((gnss_sv.svFlag & (int)IGnssCallback::GnssSvFlags::USED_IN_FIX) &&
(gnss_sv.constellation != GnssConstellationType::GPS)) {
+ if (isCnBuild && (gnss_sv.constellation == GnssConstellationType::BEIDOU)) {
+ // Do not blocklist BDS on CN builds
+ continue;
+ }
ComparableBlocklistedSource source;
source.id.svid = gnss_sv.svid;
source.id.constellation = gnss_sv.constellation;
@@ -343,7 +349,7 @@
return source_to_blocklist.id;
}
-GnssConstellationType GnssHalTest::startLocationAndGetNonGpsConstellation(
+GnssConstellationType GnssHalTest::startLocationAndGetBlockableConstellation(
const int locations_to_await, const int gnss_sv_info_list_timeout) {
if (aidl_gnss_hal_->getInterfaceVersion() <= 1) {
return static_cast<GnssConstellationType>(
@@ -360,7 +366,9 @@
ALOGD("Observed %d GnssSvInfo, while awaiting %d Locations (%d received)",
sv_info_list_cbq_size, locations_to_await, location_called_count);
- // Find first non-GPS constellation to blocklist
+ bool isCnBuild = Utils::isCnBuild();
+ ALOGD("isCnBuild: %s", isCnBuild ? "true" : "false");
+ // Find first blockable constellation to blocklist
GnssConstellationType constellation_to_blocklist = GnssConstellationType::UNKNOWN;
for (int i = 0; i < sv_info_list_cbq_size; ++i) {
std::vector<IGnssCallback::GnssSvInfo> sv_info_vec;
@@ -370,7 +378,11 @@
if ((gnss_sv.svFlag & (uint32_t)IGnssCallback::GnssSvFlags::USED_IN_FIX) &&
(gnss_sv.constellation != GnssConstellationType::UNKNOWN) &&
(gnss_sv.constellation != GnssConstellationType::GPS)) {
- // found a non-GPS constellation
+ if (isCnBuild && (gnss_sv.constellation == GnssConstellationType::BEIDOU)) {
+ // Do not blocklist BDS on CN builds
+ continue;
+ }
+ // found a blockable constellation
constellation_to_blocklist = gnss_sv.constellation;
break;
}
@@ -381,11 +393,11 @@
}
if (constellation_to_blocklist == GnssConstellationType::UNKNOWN) {
- ALOGI("No non-GPS constellations found, constellation blocklist test less effective.");
+ ALOGI("No blockable constellations found, constellation blocklist test less effective.");
// Proceed functionally to blocklist something.
constellation_to_blocklist = GnssConstellationType::GLONASS;
}
-
+ ALOGD("Constellation to blocklist: %d", constellation_to_blocklist);
return constellation_to_blocklist;
}
diff --git a/gnss/aidl/vts/gnss_hal_test.h b/gnss/aidl/vts/gnss_hal_test.h
index 88d01c1..dec5856 100644
--- a/gnss/aidl/vts/gnss_hal_test.h
+++ b/gnss/aidl/vts/gnss_hal_test.h
@@ -76,16 +76,16 @@
void StartAndCheckLocations(const int count);
void StartAndCheckLocations(const int count, const bool start_sv_status, const bool start_nmea);
- android::hardware::gnss::GnssConstellationType startLocationAndGetNonGpsConstellation(
+ android::hardware::gnss::GnssConstellationType startLocationAndGetBlockableConstellation(
const int locations_to_await, const int gnss_sv_info_list_timeout);
std::list<std::vector<android::hardware::gnss::IGnssCallback::GnssSvInfo>> convertToAidl(
const std::list<hidl_vec<android::hardware::gnss::V2_1::IGnssCallback::GnssSvInfo>>&
sv_info_list);
- android::hardware::gnss::BlocklistedSource FindStrongFrequentNonGpsSource(
+ android::hardware::gnss::BlocklistedSource FindStrongFrequentBlockableSource(
const std::list<hidl_vec<android::hardware::gnss::V2_1::IGnssCallback::GnssSvInfo>>
sv_info_list,
const int min_observations);
- android::hardware::gnss::BlocklistedSource FindStrongFrequentNonGpsSource(
+ android::hardware::gnss::BlocklistedSource FindStrongFrequentBlockableSource(
const std::list<std::vector<android::hardware::gnss::IGnssCallback::GnssSvInfo>>
sv_info_list,
const int min_observations);
diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp
index f7408d8..091b523 100644
--- a/gnss/aidl/vts/gnss_hal_test_cases.cpp
+++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp
@@ -657,19 +657,19 @@
kGnssSvInfoListTimeout);
ASSERT_EQ(count, sv_info_list_cbq_size);
source_to_blocklist =
- FindStrongFrequentNonGpsSource(sv_info_vec_list, kLocationsToAwait - 1);
+ FindStrongFrequentBlockableSource(sv_info_vec_list, kLocationsToAwait - 1);
} else {
std::list<std::vector<IGnssCallback::GnssSvInfo>> sv_info_vec_list;
int count = aidl_gnss_cb_->sv_info_list_cbq_.retrieve(
sv_info_vec_list, sv_info_list_cbq_size, kGnssSvInfoListTimeout);
ASSERT_EQ(count, sv_info_list_cbq_size);
source_to_blocklist =
- FindStrongFrequentNonGpsSource(sv_info_vec_list, kLocationsToAwait - 1);
+ FindStrongFrequentBlockableSource(sv_info_vec_list, kLocationsToAwait - 1);
}
if (source_to_blocklist.constellation == GnssConstellationType::UNKNOWN) {
- // Cannot find a non-GPS satellite. Let the test pass.
- ALOGD("Cannot find a non-GPS satellite. Letting the test pass.");
+ // Cannot find a blockable satellite. Let the test pass.
+ ALOGD("Cannot find a blockable satellite. Letting the test pass.");
return;
}
@@ -816,8 +816,8 @@
* BlocklistConstellationLocationOff:
*
* 1) Turns on location, waits for 3 locations, ensuring they are valid, and checks corresponding
- * GnssStatus for any non-GPS constellations.
- * 2a & b) Turns off location, and blocklist first non-GPS constellations.
+ * GnssStatus for any blockable constellations.
+ * 2a & b) Turns off location, and blocklist first blockable constellations.
* 3) Restart location, wait for 3 locations, ensuring they are valid, and checks corresponding
* GnssStatus does not use any constellation but GPS.
* 4a & b) Clean up by turning off location, and send in empty blocklist.
@@ -833,9 +833,9 @@
const int kLocationsToAwait = 3;
const int kGnssSvInfoListTimeout = 2;
- // Find first non-GPS constellation to blocklist
+ // Find first blockable constellation to blocklist
GnssConstellationType constellation_to_blocklist = static_cast<GnssConstellationType>(
- startLocationAndGetNonGpsConstellation(kLocationsToAwait, kGnssSvInfoListTimeout));
+ startLocationAndGetBlockableConstellation(kLocationsToAwait, kGnssSvInfoListTimeout));
// Turns off location
StopAndClearLocations();
@@ -919,8 +919,8 @@
* BlocklistConstellationLocationOn:
*
* 1) Turns on location, waits for 3 locations, ensuring they are valid, and checks corresponding
- * GnssStatus for any non-GPS constellations.
- * 2a & b) Blocklist first non-GPS constellation, and turn off location.
+ * GnssStatus for any blockable constellations.
+ * 2a & b) Blocklist first blockable constellation, and turn off location.
* 3) Restart location, wait for 3 locations, ensuring they are valid, and checks corresponding
* GnssStatus does not use any constellation but GPS.
* 4a & b) Clean up by turning off location, and send in empty blocklist.
@@ -936,9 +936,9 @@
const int kLocationsToAwait = 3;
const int kGnssSvInfoListTimeout = 2;
- // Find first non-GPS constellation to blocklist
+ // Find first blockable constellation to blocklist
GnssConstellationType constellation_to_blocklist = static_cast<GnssConstellationType>(
- startLocationAndGetNonGpsConstellation(kLocationsToAwait, kGnssSvInfoListTimeout));
+ startLocationAndGetBlockableConstellation(kLocationsToAwait, kGnssSvInfoListTimeout));
BlocklistedSource source_to_blocklist_1;
source_to_blocklist_1.constellation = constellation_to_blocklist;
diff --git a/gnss/common/utils/vts/Utils.cpp b/gnss/common/utils/vts/Utils.cpp
index e3ff0f3..38afaf3 100644
--- a/gnss/common/utils/vts/Utils.cpp
+++ b/gnss/common/utils/vts/Utils.cpp
@@ -319,6 +319,24 @@
return d * 1000; // meters
}
+// Returns true iff the device has the specified feature.
+bool Utils::deviceSupportsFeature(const char* feature) {
+ bool device_supports_feature = false;
+ FILE* p = popen("/system/bin/pm list features", "re");
+ if (p) {
+ char* line = NULL;
+ size_t len = 0;
+ while (getline(&line, &len, p) > 0) {
+ if (strstr(line, feature)) {
+ device_supports_feature = true;
+ break;
+ }
+ }
+ pclose(p);
+ }
+ return device_supports_feature;
+}
+
} // namespace common
} // namespace gnss
} // namespace hardware
diff --git a/gnss/common/utils/vts/include/Utils.h b/gnss/common/utils/vts/include/Utils.h
index 62d409a..09b99c4 100644
--- a/gnss/common/utils/vts/include/Utils.h
+++ b/gnss/common/utils/vts/include/Utils.h
@@ -60,6 +60,11 @@
static bool isAutomotiveDevice();
static double distanceMeters(double lat1, double lon1, double lat2, double lon2);
+ // Returns true iff the device has the specified feature.
+ static bool deviceSupportsFeature(const char* feature);
+
+ static bool isCnBuild() { return deviceSupportsFeature("cn.google.services"); }
+
private:
template <class T>
static int64_t getLocationTimestampMillis(const T&);
diff --git a/graphics/Android.bp b/graphics/Android.bp
index 352f3bd..c33f7ff 100644
--- a/graphics/Android.bp
+++ b/graphics/Android.bp
@@ -53,6 +53,7 @@
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_static",
static_libs: [
+ "android.hardware.drm.common-V1-ndk",
"android.hardware.graphics.composer3-V4-ndk",
],
}
@@ -60,6 +61,7 @@
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_shared",
shared_libs: [
+ "android.hardware.drm.common-V1-ndk",
"android.hardware.graphics.composer3-V4-ndk",
],
}
diff --git a/graphics/composer/aidl/Android.bp b/graphics/composer/aidl/Android.bp
index 3b60f68..1728f78 100644
--- a/graphics/composer/aidl/Android.bp
+++ b/graphics/composer/aidl/Android.bp
@@ -37,6 +37,7 @@
imports: [
"android.hardware.graphics.common-V5",
"android.hardware.common-V2",
+ "android.hardware.drm.common-V1",
],
backend: {
cpp: {
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl
index e64bd52..cd27360 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl
@@ -45,4 +45,5 @@
oneway void onVsyncIdle(long display);
oneway void onRefreshRateChangedDebug(in android.hardware.graphics.composer3.RefreshRateChangedDebugData data);
void onHotplugEvent(long display, android.hardware.graphics.common.DisplayHotplugEvent event);
+ oneway void onHdcpLevelsChanged(long display, in android.hardware.drm.HdcpLevels levels);
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
index 96eccd7..a1d61fd 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
@@ -16,6 +16,7 @@
package android.hardware.graphics.composer3;
+import android.hardware.drm.HdcpLevels;
import android.hardware.graphics.common.DisplayHotplugEvent;
import android.hardware.graphics.composer3.RefreshRateChangedDebugData;
import android.hardware.graphics.composer3.VsyncPeriodChangeTimeline;
@@ -139,4 +140,12 @@
* @param event is the type of event that occurred.
*/
void onHotplugEvent(long display, DisplayHotplugEvent event);
+
+ /**
+ * Notify the client the HDCP levels of the display changed.
+ *
+ * @param display is the display whose HDCP levels have changed.
+ * @param levels is the new HDCP levels.
+ */
+ oneway void onHdcpLevelsChanged(long display, in HdcpLevels levels);
}
diff --git a/graphics/composer/aidl/vts/Android.bp b/graphics/composer/aidl/vts/Android.bp
index a2ab3d6..894ca52 100644
--- a/graphics/composer/aidl/vts/Android.bp
+++ b/graphics/composer/aidl/vts/Android.bp
@@ -66,6 +66,7 @@
"android.hardware.graphics.common@1.2",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
+ "android.hardware.drm.common-V1-ndk",
"libaidlcommonsupport",
"libarect",
"libbase",
diff --git a/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp b/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp
index 544f692..1f7972c 100644
--- a/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp
+++ b/graphics/composer/aidl/vts/GraphicsComposerCallback.cpp
@@ -208,4 +208,15 @@
}
}
+::ndk::ScopedAStatus GraphicsComposerCallback::onHdcpLevelsChanged(
+ int64_t in_display, const ::aidl::android::hardware::drm::HdcpLevels&) {
+ std::scoped_lock lock(mMutex);
+
+ const auto it = std::find(mDisplays.begin(), mDisplays.end(), in_display);
+ if (it != mDisplays.end()) {
+ mHdcpLevelChangedCount++;
+ }
+ return ::ndk::ScopedAStatus::ok();
+}
+
} // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/graphics/composer/aidl/vts/GraphicsComposerCallback.h b/graphics/composer/aidl/vts/GraphicsComposerCallback.h
index 7a8d4a3..97f8e2b 100644
--- a/graphics/composer/aidl/vts/GraphicsComposerCallback.h
+++ b/graphics/composer/aidl/vts/GraphicsComposerCallback.h
@@ -65,6 +65,8 @@
const RefreshRateChangedDebugData&) override;
virtual ::ndk::ScopedAStatus onHotplugEvent(int64_t in_display,
common::DisplayHotplugEvent) override;
+ virtual ::ndk::ScopedAStatus onHdcpLevelsChanged(
+ int64_t in_display, const ::aidl::android::hardware::drm::HdcpLevels&) override;
mutable std::mutex mMutex;
// the set of all currently connected displays
@@ -88,6 +90,7 @@
int32_t mInvalidVsyncPeriodChangeCount GUARDED_BY(mMutex) = 0;
int32_t mInvalidSeamlessPossibleCount GUARDED_BY(mMutex) = 0;
int32_t mInvalidRefreshRateDebugEnabledCallbackCount GUARDED_BY(mMutex) = 0;
+ int32_t mHdcpLevelChangedCount GUARDED_BY(mMutex) = 0;
};
} // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/keymaster/aidl/Android.bp b/keymaster/aidl/Android.bp
index 0f2debd..9f4e5cb 100644
--- a/keymaster/aidl/Android.bp
+++ b/keymaster/aidl/Android.bp
@@ -18,6 +18,12 @@
java: {
platform_apis: true,
},
+ ndk: {
+ apex_available: [
+ "com.android.hardware.biometrics.fingerprint.virtual",
+ "//apex_available:platform",
+ ],
+ },
},
versions_with_info: [
{
diff --git a/security/keymint/support/include/remote_prov/remote_prov_utils.h b/security/keymint/support/include/remote_prov/remote_prov_utils.h
index b7c32ca..141f243 100644
--- a/security/keymint/support/include/remote_prov/remote_prov_utils.h
+++ b/security/keymint/support/include/remote_prov/remote_prov_utils.h
@@ -21,6 +21,7 @@
#include <vector>
#include "aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.h"
+#include <hwtrust/hwtrust.h>
#include <keymaster/cppcose/cppcose.h>
namespace aidl::android::hardware::security::keymint::remote_prov {
@@ -176,7 +177,8 @@
*/
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge);
+ IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge,
+ bool allowDegenerate = true);
/**
* Verify the CSR as if the device is a final production sample.
*/
@@ -188,4 +190,9 @@
/** Checks whether the CSR has a proper DICE chain. */
ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr);
+/** Verify the DICE chain. */
+ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
+ hwtrust::DiceChain::Kind kind, bool allowAnyMode,
+ bool allowDegenerate);
+
} // namespace aidl::android::hardware::security::keymint::remote_prov
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index 646037c..a679340 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -26,7 +26,6 @@
#include <android-base/macros.h>
#include <android-base/properties.h>
#include <cppbor.h>
-#include <hwtrust/hwtrust.h>
#include <json/json.h>
#include <keymaster/km_openssl/ec_key.h>
#include <keymaster/km_openssl/ecdsa_operation.h>
@@ -325,7 +324,8 @@
}
ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
- hwtrust::DiceChain::Kind kind, bool allowAnyMode) {
+ hwtrust::DiceChain::Kind kind, bool allowAnyMode,
+ bool allowDegenerate) {
auto encodedBcc = bcc->encode();
// Use ro.build.type instead of ro.debuggable because ro.debuggable=1 for VTS testing
@@ -336,6 +336,11 @@
auto chain = hwtrust::DiceChain::Verify(encodedBcc, kind, allowAnyMode);
if (!chain.ok()) return chain.error().message();
+
+ if (!allowDegenerate && !chain->IsProper()) {
+ return "DICE chain is degenerate";
+ }
+
auto keys = chain->CosePublicKeys();
if (!keys.ok()) return keys.error().message();
std::vector<BccEntryData> result;
@@ -701,7 +706,8 @@
}
// BCC is [ pubkey, + BccEntry]
- auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr13, allowAnyMode);
+ auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr13, allowAnyMode,
+ /*allowDegenerate=*/true);
if (!bccContents) {
return bccContents.message() + "\n" + prettyPrint(bcc.get());
}
@@ -997,7 +1003,8 @@
ErrMsgOr<bytevec> parseAndValidateAuthenticatedRequest(const std::vector<uint8_t>& request,
const std::vector<uint8_t>& challenge,
- bool allowAnyMode = false) {
+ bool allowAnyMode = false,
+ bool allowDegenerate = true) {
auto [parsedRequest, _, csrErrMsg] = cppbor::parse(request);
if (!parsedRequest) {
return csrErrMsg;
@@ -1035,19 +1042,20 @@
return diceChainKind.message();
}
- auto diceContents = validateBcc(diceCertChain, *diceChainKind, allowAnyMode);
+ auto diceContents = validateBcc(diceCertChain, *diceChainKind, allowAnyMode, allowDegenerate);
if (!diceContents) {
return diceContents.message() + "\n" + prettyPrint(diceCertChain);
}
- auto& udsPub = diceContents->back().pubKey;
+ auto udsPub = diceCertChain->get(0)->asMap()->encode();
+ auto& kmDiceKey = diceContents->back().pubKey;
auto error = validateUdsCerts(*udsCerts, udsPub);
if (!error.empty()) {
return error;
}
- auto signedPayload = verifyAndParseCoseSign1(signedData, udsPub, {} /* aad */);
+ auto signedPayload = verifyAndParseCoseSign1(signedData, kmDiceKey, {} /* aad */);
if (!signedPayload) {
return signedPayload.message();
}
@@ -1064,7 +1072,8 @@
const std::vector<uint8_t>& csr,
IRemotelyProvisionedComponent* provisionable,
const std::vector<uint8_t>& challenge,
- bool isFactory, bool allowAnyMode = false) {
+ bool isFactory, bool allowAnyMode = false,
+ bool allowDegenerate = true) {
RpcHardwareInfo info;
provisionable->getHardwareInfo(&info);
if (info.versionNumber != 3) {
@@ -1072,7 +1081,8 @@
") does not match expected version (3).";
}
- auto csrPayload = parseAndValidateAuthenticatedRequest(csr, challenge, allowAnyMode);
+ auto csrPayload =
+ parseAndValidateAuthenticatedRequest(csr, challenge, allowAnyMode, allowDegenerate);
if (!csrPayload) {
return csrPayload.message();
}
@@ -1082,8 +1092,10 @@
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge) {
- return verifyCsr(keysToSign, csr, provisionable, challenge, /*isFactory=*/true);
+ IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge,
+ bool allowDegenerate) {
+ return verifyCsr(keysToSign, csr, provisionable, challenge, /*isFactory=*/true,
+ /*allowAnyMode=*/false, allowDegenerate);
}
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyProductionCsr(
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index 89469f1..82121cb 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -41,6 +41,41 @@
using ::testing::ElementsAreArray;
using byte_view = std::span<const uint8_t>;
+inline const std::vector<uint8_t> kDegenerateBcc{
+ 0x82, 0xa5, 0x01, 0x01, 0x03, 0x27, 0x04, 0x81, 0x02, 0x20, 0x06, 0x21, 0x58, 0x20, 0xf5,
+ 0x5a, 0xfb, 0x28, 0x06, 0x48, 0x68, 0xea, 0x49, 0x3e, 0x47, 0x80, 0x1d, 0xfe, 0x1f, 0xfc,
+ 0xa8, 0x84, 0xb3, 0x4d, 0xdb, 0x99, 0xc7, 0xbf, 0x23, 0x53, 0xe5, 0x71, 0x92, 0x41, 0x9b,
+ 0x46, 0x84, 0x43, 0xa1, 0x01, 0x27, 0xa0, 0x59, 0x01, 0x75, 0xa9, 0x01, 0x78, 0x28, 0x31,
+ 0x64, 0x34, 0x35, 0x65, 0x33, 0x35, 0x63, 0x34, 0x35, 0x37, 0x33, 0x31, 0x61, 0x32, 0x62,
+ 0x34, 0x35, 0x36, 0x37, 0x63, 0x33, 0x63, 0x65, 0x35, 0x31, 0x36, 0x66, 0x35, 0x63, 0x31,
+ 0x66, 0x34, 0x33, 0x61, 0x62, 0x64, 0x36, 0x30, 0x62, 0x02, 0x78, 0x28, 0x31, 0x64, 0x34,
+ 0x35, 0x65, 0x33, 0x35, 0x63, 0x34, 0x35, 0x37, 0x33, 0x31, 0x61, 0x32, 0x62, 0x34, 0x35,
+ 0x36, 0x37, 0x63, 0x33, 0x63, 0x65, 0x35, 0x31, 0x36, 0x66, 0x35, 0x63, 0x31, 0x66, 0x34,
+ 0x33, 0x61, 0x62, 0x64, 0x36, 0x30, 0x62, 0x3a, 0x00, 0x47, 0x44, 0x50, 0x58, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3a, 0x00, 0x47, 0x44, 0x53, 0x41, 0xa0, 0x3a, 0x00, 0x47, 0x44, 0x52,
+ 0x58, 0x40, 0x71, 0xd7, 0x47, 0x9e, 0x61, 0xb5, 0x30, 0xa3, 0xda, 0xe6, 0xac, 0xb2, 0x91,
+ 0xa4, 0xf9, 0xcf, 0x7f, 0xba, 0x6b, 0x5f, 0xf9, 0xa3, 0x7f, 0xba, 0xab, 0xac, 0x69, 0xdd,
+ 0x0b, 0x04, 0xd6, 0x34, 0xd2, 0x3f, 0x8f, 0x84, 0x96, 0xd7, 0x58, 0x51, 0x1d, 0x68, 0x25,
+ 0xea, 0xbe, 0x11, 0x11, 0x1e, 0xd8, 0xdf, 0x4b, 0x62, 0x78, 0x5c, 0xa8, 0xfa, 0xb7, 0x66,
+ 0x4e, 0x8d, 0xac, 0x3b, 0x00, 0x4c, 0x3a, 0x00, 0x47, 0x44, 0x54, 0x58, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x00, 0x3a, 0x00, 0x47, 0x44, 0x57, 0x58,
+ 0x2d, 0xa5, 0x01, 0x01, 0x03, 0x27, 0x04, 0x81, 0x02, 0x20, 0x06, 0x21, 0x58, 0x20, 0xf5,
+ 0x5a, 0xfb, 0x28, 0x06, 0x48, 0x68, 0xea, 0x49, 0x3e, 0x47, 0x80, 0x1d, 0xfe, 0x1f, 0xfc,
+ 0xa8, 0x84, 0xb3, 0x4d, 0xdb, 0x99, 0xc7, 0xbf, 0x23, 0x53, 0xe5, 0x71, 0x92, 0x41, 0x9b,
+ 0x46, 0x3a, 0x00, 0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40, 0x31, 0x5c, 0x43, 0x87, 0xf9,
+ 0xbb, 0xb9, 0x45, 0x09, 0xa8, 0xe8, 0x08, 0x70, 0xc4, 0xd9, 0xdc, 0x4e, 0x5a, 0x19, 0x10,
+ 0x4f, 0xa3, 0x21, 0x20, 0x34, 0x05, 0x5b, 0x2e, 0x78, 0x91, 0xd1, 0xe2, 0x39, 0x43, 0x8b,
+ 0x50, 0x12, 0x82, 0x37, 0xfe, 0xa4, 0x07, 0xc3, 0xd5, 0xc3, 0x78, 0xcc, 0xf9, 0xef, 0xe1,
+ 0x95, 0x38, 0x9f, 0xb0, 0x79, 0x16, 0x4c, 0x4a, 0x23, 0xc4, 0xdc, 0x35, 0x4e, 0x0f};
+
inline bool equal_byte_views(const byte_view& view1, const byte_view& view2) {
return std::equal(view1.begin(), view1.end(), view2.begin(), view2.end());
}
@@ -258,5 +293,14 @@
EXPECT_THAT(eekPubY, ElementsAreArray(geek->getBstrValue(CoseKey::PUBKEY_Y).value_or(empty)));
}
+TEST(RemoteProvUtilsTest, validateBccDegenerate) {
+ auto [bcc, _, errMsg] = cppbor::parse(kDegenerateBcc);
+ ASSERT_TRUE(bcc) << "Error: " << errMsg;
+
+ EXPECT_TRUE(validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr16,
+ /*allowAnyMode=*/false, /*allowDegenerate=*/true));
+ EXPECT_FALSE(validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr16,
+ /*allowAnyMode=*/false, /*allowDegenerate=*/false));
+}
} // namespace
} // namespace aidl::android::hardware::security::keymint::remote_prov
diff --git a/threadnetwork/aidl/default/Android.bp b/threadnetwork/aidl/default/Android.bp
index 51e5c25..a840fa3 100644
--- a/threadnetwork/aidl/default/Android.bp
+++ b/threadnetwork/aidl/default/Android.bp
@@ -14,6 +14,8 @@
vendor: true,
relative_install_path: "hw",
+ defaults: ["android.hardware.threadnetwork-service.defaults"],
+
shared_libs: [
"libbinder_ndk",
"liblog",
@@ -43,6 +45,17 @@
],
}
+cc_defaults {
+ name: "android.hardware.threadnetwork-service.defaults",
+ product_variables: {
+ debuggable: {
+ cppflags: [
+ "-DDEV_BUILD",
+ ],
+ },
+ },
+}
+
cc_fuzz {
name: "android.hardware.threadnetwork-service.fuzzer",
diff --git a/threadnetwork/aidl/default/socket_interface.cpp b/threadnetwork/aidl/default/socket_interface.cpp
index 339fd6b..a5aa2b4 100644
--- a/threadnetwork/aidl/default/socket_interface.cpp
+++ b/threadnetwork/aidl/default/socket_interface.cpp
@@ -94,8 +94,8 @@
otError SocketInterface::WaitForFrame(uint64_t aTimeoutUs) {
otError error = OT_ERROR_NONE;
struct timeval timeout;
- timeout.tv_sec = static_cast<time_t>(aTimeoutUs / US_PER_S);
- timeout.tv_usec = static_cast<suseconds_t>(aTimeoutUs % US_PER_S);
+ timeout.tv_sec = static_cast<time_t>(aTimeoutUs / OT_US_PER_S);
+ timeout.tv_usec = static_cast<suseconds_t>(aTimeoutUs % OT_US_PER_S);
fd_set readFds;
fd_set errorFds;
@@ -133,8 +133,8 @@
while (mIsHardwareResetting && retries++ < kMaxRetriesForSocketCloseCheck) {
struct timeval timeout;
- timeout.tv_sec = static_cast<time_t>(aTimeoutMs / MS_PER_S);
- timeout.tv_usec = static_cast<suseconds_t>((aTimeoutMs % MS_PER_S) * MS_PER_S);
+ timeout.tv_sec = static_cast<time_t>(aTimeoutMs / OT_MS_PER_S);
+ timeout.tv_usec = static_cast<suseconds_t>((aTimeoutMs % OT_MS_PER_S) * OT_MS_PER_S);
fd_set readFds;
@@ -314,8 +314,8 @@
fd_set fds;
FD_ZERO(&fds);
FD_SET(inotifyFd, &fds);
- struct timeval timeout = {kMaxSelectTimeMs / MS_PER_S,
- (kMaxSelectTimeMs % MS_PER_S) * MS_PER_S};
+ struct timeval timeout = {kMaxSelectTimeMs / OT_MS_PER_S,
+ (kMaxSelectTimeMs % OT_MS_PER_S) * OT_MS_PER_S};
int rval = select(inotifyFd + 1, &fds, nullptr, nullptr, &timeout);
VerifyOrDie(rval >= 0, OT_EXIT_ERROR_ERRNO);
diff --git a/threadnetwork/aidl/default/utils.cpp b/threadnetwork/aidl/default/utils.cpp
index 3552b3a..740f331 100644
--- a/threadnetwork/aidl/default/utils.cpp
+++ b/threadnetwork/aidl/default/utils.cpp
@@ -43,6 +43,7 @@
}
void otDumpDebgPlat(const char* aText, const void* aData, uint16_t aDataLength) {
+#ifdef DEV_BUILD
constexpr uint16_t kBufSize = 512;
char buf[kBufSize];
@@ -55,6 +56,11 @@
__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, "%s: %s", aText, buf);
}
+#else
+ OT_UNUSED_VARIABLE(aText);
+ OT_UNUSED_VARIABLE(aData);
+ OT_UNUSED_VARIABLE(aDataLength);
+#endif
}
OT_TOOL_WEAK void otPlatAlarmMilliFired(otInstance* aInstance) {
diff --git a/uwb/aidl/vts/VtsHalUwbTargetTest.cpp b/uwb/aidl/vts/VtsHalUwbTargetTest.cpp
index 548cae0..2b09f7e 100644
--- a/uwb/aidl/vts/VtsHalUwbTargetTest.cpp
+++ b/uwb/aidl/vts/VtsHalUwbTargetTest.cpp
@@ -201,14 +201,15 @@
EXPECT_EQ(retrieved_chip_name, chip_name);
}
-/**
TEST_P(UwbAidl, ChipSendUciMessage_GetDeviceInfo) {
-const auto iuwb_chip = getAnyChipAndOpen(callback);
-EXPECT_TRUE(iuwb_chip->coreInit(callback).isOk());
+ const auto iuwb_chip = getAnyChipAndOpen();
+ EXPECT_TRUE(iuwb_chip->coreInit().isOk());
-const std::vector<uint8_t>
-EXPECT_TRUE(iuwb_chip->sendUciMessage().isOk());
-} */
+ std::vector<uint8_t> uciMessage = {0x20, 0x02, 0x00, 0x00}; /** CoreGetDeviceInfo */
+ int32_t* return_status = new int32_t;
+ EXPECT_TRUE(iuwb_chip->sendUciMessage(uciMessage, return_status).isOk());
+ EXPECT_EQ(*return_status, 4 /* Status Ok */);
+}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(UwbAidl);
INSTANTIATE_TEST_SUITE_P(Uwb, UwbAidl,
diff --git a/wifi/hostapd/aidl/Android.bp b/wifi/hostapd/aidl/Android.bp
index 2e4d4d1..88f4ef2 100644
--- a/wifi/hostapd/aidl/Android.bp
+++ b/wifi/hostapd/aidl/Android.bp
@@ -65,5 +65,5 @@
},
],
- frozen: true,
+ frozen: false,
}
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/BandMask.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/BandMask.aidl
index b1e7f66..fa9f198 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/BandMask.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/BandMask.aidl
@@ -34,8 +34,8 @@
package android.hardware.wifi.hostapd;
@Backing(type="int") @VintfStability
enum BandMask {
- BAND_2_GHZ = 1,
- BAND_5_GHZ = 2,
- BAND_6_GHZ = 4,
- BAND_60_GHZ = 8,
+ BAND_2_GHZ = (1 << 0) /* 1 */,
+ BAND_5_GHZ = (1 << 1) /* 2 */,
+ BAND_6_GHZ = (1 << 2) /* 4 */,
+ BAND_60_GHZ = (1 << 3) /* 8 */,
}
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/EncryptionType.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/EncryptionType.aidl
index a7b20fa..840b875 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/EncryptionType.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/EncryptionType.aidl
@@ -34,11 +34,11 @@
package android.hardware.wifi.hostapd;
@Backing(type="int") @VintfStability
enum EncryptionType {
- NONE = 0,
- WPA = 1,
- WPA2 = 2,
- WPA3_SAE_TRANSITION = 3,
- WPA3_SAE = 4,
- WPA3_OWE_TRANSITION = 5,
- WPA3_OWE = 6,
+ NONE,
+ WPA,
+ WPA2,
+ WPA3_SAE_TRANSITION,
+ WPA3_SAE,
+ WPA3_OWE_TRANSITION,
+ WPA3_OWE,
}
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/Generation.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/Generation.aidl
index 5bb0d32..a0c1886 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/Generation.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/Generation.aidl
@@ -34,7 +34,7 @@
package android.hardware.wifi.hostapd;
@Backing(type="int") @VintfStability
enum Generation {
- WIFI_STANDARD_UNKNOWN = -1,
+ WIFI_STANDARD_UNKNOWN = (-1) /* -1 */,
WIFI_STANDARD_LEGACY = 0,
WIFI_STANDARD_11N = 1,
WIFI_STANDARD_11AC = 2,
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/HostapdStatusCode.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/HostapdStatusCode.aidl
index 548e497..7edff15 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/HostapdStatusCode.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/HostapdStatusCode.aidl
@@ -34,10 +34,10 @@
package android.hardware.wifi.hostapd;
@Backing(type="int") @VintfStability
enum HostapdStatusCode {
- SUCCESS = 0,
- FAILURE_UNKNOWN = 1,
- FAILURE_ARGS_INVALID = 2,
- FAILURE_IFACE_UNKNOWN = 3,
- FAILURE_IFACE_EXISTS = 4,
- FAILURE_CLIENT_UNKNOWN = 5,
+ SUCCESS,
+ FAILURE_UNKNOWN,
+ FAILURE_ARGS_INVALID,
+ FAILURE_IFACE_UNKNOWN,
+ FAILURE_IFACE_EXISTS,
+ FAILURE_CLIENT_UNKNOWN,
}
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IfaceParams.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IfaceParams.aidl
index 64367bb..8da3441 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IfaceParams.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IfaceParams.aidl
@@ -38,4 +38,6 @@
android.hardware.wifi.hostapd.HwModeParams hwModeParams;
android.hardware.wifi.hostapd.ChannelParams[] channelParams;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
+ @nullable String[] instanceIdentities;
+ boolean isMlo;
}
diff --git a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IfaceParams.aidl b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IfaceParams.aidl
index 3f8ee39..bb646e3 100644
--- a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IfaceParams.aidl
+++ b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IfaceParams.aidl
@@ -41,4 +41,12 @@
* Optional vendor-specific configuration parameters.
*/
@nullable OuiKeyedData[] vendorData;
+ /**
+ * The list of the instance identities.
+ */
+ @nullable String[] instanceIdentities;
+ /**
+ * Whether the current iface is MLO.
+ */
+ boolean isMlo;
}
diff --git a/wifi/hostapd/aidl/vts/functional/Android.bp b/wifi/hostapd/aidl/vts/functional/Android.bp
index f614679..bf1b0d0 100644
--- a/wifi/hostapd/aidl/vts/functional/Android.bp
+++ b/wifi/hostapd/aidl/vts/functional/Android.bp
@@ -21,7 +21,7 @@
"libvndksupport",
],
static_libs: [
- "android.hardware.wifi.hostapd-V2-ndk",
+ "android.hardware.wifi.hostapd-V3-ndk",
"VtsHalWifiV1_0TargetTestUtil",
"VtsHalWifiV1_5TargetTestUtil",
"VtsHalWifiV1_6TargetTestUtil",