Merge "Populate both VehiclePropConfig and VehicleAreaConfig.access" into main
diff --git a/audio/aidl/default/visualizer/VisualizerSw.h b/audio/aidl/default/visualizer/VisualizerSw.h
index 4b87b04..819351a 100644
--- a/audio/aidl/default/visualizer/VisualizerSw.h
+++ b/audio/aidl/default/visualizer/VisualizerSw.h
@@ -19,20 +19,22 @@
#include <vector>
#include <aidl/android/hardware/audio/effect/BnEffect.h>
+#include <system/audio_effects/effect_visualizer.h>
#include "effect-impl/EffectImpl.h"
namespace aidl::android::hardware::audio::effect {
class VisualizerSwContext final : public EffectContext {
public:
- static const int kMinCaptureSize = 0x80;
- static const int kMaxCaptureSize = 0x400;
- static const int kMaxLatencyMs = 3000;
- static const int kMaxCaptureBufSize = 0xffff;
+ // need align the min/max capture size to VISUALIZER_CAPTURE_SIZE_MIN and
+ // VISUALIZER_CAPTURE_SIZE_MAX because of limitation in audio_utils fixedfft.
+ static constexpr int32_t kMinCaptureSize = VISUALIZER_CAPTURE_SIZE_MIN;
+ static constexpr int32_t kMaxCaptureSize = VISUALIZER_CAPTURE_SIZE_MAX;
+ static constexpr int32_t kMaxLatencyMs = 3000;
VisualizerSwContext(int statusDepth, const Parameter::Common& common)
: EffectContext(statusDepth, common) {
LOG(DEBUG) << __func__;
- mCaptureSampleBuffer.resize(kMaxCaptureBufSize);
+ mCaptureSampleBuffer.resize(kMaxCaptureSize);
fill(mCaptureSampleBuffer.begin(), mCaptureSampleBuffer.end(), 0x80);
}
diff --git a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
index c00e64c..df0f51c 100644
--- a/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
+++ b/automotive/vehicle/aidl/emu_metadata/android.hardware.automotive.vehicle-types-meta.json
@@ -1129,6 +1129,14 @@
"data_enum": "VehicleAutonomousState"
},
{
+ "name": "CAMERA_SERVICE_CURRENT_STATE",
+ "value": 289476429,
+ "data_enums": [
+ "CameraServiceState"
+ ],
+ "data_enum": "CameraServiceState"
+ },
+ {
"name": "AUTOMATIC_EMERGENCY_BRAKING_ENABLED",
"value": 287313920
},
@@ -2819,6 +2827,28 @@
]
},
{
+ "name": "CameraServiceState",
+ "package": "android.hardware.automotive.vehicle",
+ "values": [
+ {
+ "name": "UNAVAILABLE",
+ "value": 0
+ },
+ {
+ "name": "INACTIVE",
+ "value": 1
+ },
+ {
+ "name": "REQUESTED",
+ "value": 2
+ },
+ {
+ "name": "ACTIVE",
+ "value": 3
+ }
+ ]
+ },
+ {
"name": "GsrComplianceRequirementType",
"package": "android.hardware.automotive.vehicle",
"values": [
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
index 15056e2..51a3025 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
@@ -262,6 +262,7 @@
{VehicleProperty::VEHICLE_IN_USE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyAccess::WRITE},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyAccess::READ},
+ {VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyAccess::WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
index d3f97e3..60e9a72 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
@@ -262,6 +262,7 @@
{VehicleProperty::VEHICLE_IN_USE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/VersionForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/VersionForVehicleProperty.h
index 70c914d..1c1035d 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/VersionForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/VersionForVehicleProperty.h
@@ -261,6 +261,7 @@
{VehicleProperty::VEHICLE_IN_USE, 2},
{VehicleProperty::CLUSTER_HEARTBEAT, 3},
{VehicleProperty::VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, 3},
+ {VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, 3},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, 2},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, 2},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, 2},
diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
index e55f4dc..afb6cab 100644
--- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
@@ -255,6 +255,7 @@
Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyAccess.READ),
+ Map.entry(VehicleProperty.CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
index e351a3f..12aff40 100644
--- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
@@ -255,6 +255,7 @@
Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
diff --git a/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java
index 4b8060f..0f86bfa 100644
--- a/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java
@@ -85,6 +85,7 @@
Map.entry(VehicleProperty.GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, List.of(GsrComplianceRequirementType.class)),
Map.entry(VehicleProperty.SHUTDOWN_REQUEST, List.of(VehicleApPowerStateShutdownParam.class)),
Map.entry(VehicleProperty.VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL, List.of(VehicleAutonomousState.class)),
+ Map.entry(VehicleProperty.CAMERA_SERVICE_CURRENT_STATE, List.of(CameraServiceState.class)),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, List.of(AutomaticEmergencyBrakingState.class, ErrorState.class)),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_STATE, List.of(ForwardCollisionWarningState.class, ErrorState.class)),
Map.entry(VehicleProperty.BLIND_SPOT_WARNING_STATE, List.of(BlindSpotWarningState.class, ErrorState.class)),
diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
index 7156b7e..040e087 100644
--- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
+++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
@@ -37,6 +37,7 @@
using ::aidl::android::hardware::automotive::vehicle::AccessForVehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::AutomaticEmergencyBrakingState;
using ::aidl::android::hardware::automotive::vehicle::BlindSpotWarningState;
+using ::aidl::android::hardware::automotive::vehicle::CameraServiceState;
using ::aidl::android::hardware::automotive::vehicle::ChangeModeForVehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::CrossTrafficMonitoringWarningState;
using ::aidl::android::hardware::automotive::vehicle::CruiseControlCommand;
@@ -259,6 +260,8 @@
std::make_unique<ConstantParser<ImpactSensorLocation>>();
mConstantParsersByType["EmergencyLaneKeepAssistState"] =
std::make_unique<ConstantParser<EmergencyLaneKeepAssistState>>();
+ mConstantParsersByType["CameraServiceState"] =
+ std::make_unique<ConstantParser<CameraServiceState>>();
mConstantParsersByType["CruiseControlType"] =
std::make_unique<ConstantParser<CruiseControlType>>();
mConstantParsersByType["CruiseControlState"] =
diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index 590eff9..b7911eb 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -5067,6 +5067,21 @@
]
}
]
+ },
+ {
+ "property": "VehicleProperty::CAMERA_SERVICE_CURRENT_STATE",
+ "defaultValue": {
+ "int32Values": [
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE",
+ "CameraServiceState::UNAVAILABLE"
+ ]
+ }
}
]
}
diff --git a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
index 0c8ebbd..1cd0d16 100644
--- a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
+++ b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
@@ -19,6 +19,7 @@
#include <aidl/android/hardware/automotive/vehicle/AutomaticEmergencyBrakingState.h>
#include <aidl/android/hardware/automotive/vehicle/BlindSpotWarningState.h>
+#include <aidl/android/hardware/automotive/vehicle/CameraServiceState.h>
#include <aidl/android/hardware/automotive/vehicle/CrossTrafficMonitoringWarningState.h>
#include <aidl/android/hardware/automotive/vehicle/CruiseControlCommand.h>
#include <aidl/android/hardware/automotive/vehicle/CruiseControlState.h>
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/CameraServiceState.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/CameraServiceState.aidl
new file mode 100644
index 0000000..84f5ec7
--- /dev/null
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/CameraServiceState.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.automotive.vehicle;
+@Backing(type="int") @VintfStability
+enum CameraServiceState {
+ UNAVAILABLE = 0,
+ INACTIVE = 1,
+ REQUESTED = 2,
+ ACTIVE = 3,
+}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
index 2e25466..be8d3ac 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -261,6 +261,7 @@
VEHICLE_IN_USE = (((0x0F4A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313738 */,
CLUSTER_HEARTBEAT = (((0x0F4B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 299896651 */,
VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL = (((0x0F4C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410892 */,
+ CAMERA_SERVICE_CURRENT_STATE = (((0x0F4D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 289476429 */,
AUTOMATIC_EMERGENCY_BRAKING_ENABLED = (((0x1000 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313920 */,
AUTOMATIC_EMERGENCY_BRAKING_STATE = (((0x1001 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411073 */,
FORWARD_COLLISION_WARNING_ENABLED = (((0x1002 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313922 */,
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CameraServiceState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CameraServiceState.aidl
new file mode 100644
index 0000000..0e01913
--- /dev/null
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/CameraServiceState.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.automotive.vehicle;
+
+/**
+ * Used by CAMERA_SERVICE_CURRENT_STATE to describe current state of CarEvsService types.
+ *
+ * This is consistent with CarEvsManager.SERVICE_STATE_* constants.
+ */
+@VintfStability
+@Backing(type="int")
+enum CameraServiceState {
+ /**
+ * State that a corresponding service type is not available.
+ */
+ UNAVAILABLE = 0,
+
+ /**
+ * State that a corresponding service type is inactive; it's available but not used
+ * by any clients yet.
+ */
+ INACTIVE = 1,
+
+ /**
+ * State that CarEvsService requested launching a registered activity; the service is waiting
+ * for a video request from it.
+ */
+ REQUESTED = 2,
+
+ /**
+ * State that a corresponding service type is actively being used.
+ */
+ ACTIVE = 3,
+}
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index 97e7847..812b9b9 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -5067,6 +5067,30 @@
VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL =
0x0F4C + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+ /**
+ * Reports current state of CarEvsService types.
+ *
+ * Informs other components of current state of each CarEvsService service type with values
+ * defined in CameraServiceState. CarEvsService will update this property whenever a service
+ * type transitions into a new state.
+ *
+ * int32[0]: Current state of REARVIEW service type.
+ * int32[1]: Current state of SURROUNDVIEW service type.
+ * int32[2]: Current state of FRONTVIEW service type.
+ * int32[3]: Current state of LEFTVIEW service type.
+ * int32[4]: Current state of RIGHTVIEW service type.
+ * int32[5]: Current state of DRIVERVIEW service type.
+ * int32[6]: Current state of FRONT_PASSENGERVIEW service type.
+ * int32[7]: Current state of REAR_PASSENGERVIEW service type.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.WRITE
+ * @data_enum CameraServiceState
+ * @version 3
+ */
+ CAMERA_SERVICE_CURRENT_STATE = 0x0F4D + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL
+ + VehiclePropertyType.INT32_VEC,
+
/***********************************************************************************************
* Start of ADAS Properties
*
diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
index 2b054a1..888b1e1 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -1176,6 +1176,12 @@
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
}
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyCameraServiceCurrentStateConfig) {
+ verifyProperty(VehicleProperty::CAMERA_SERVICE_CURRENT_STATE, VehiclePropertyAccess::WRITE,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::INT32_VEC);
+}
+
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySeatAirbagsDeployedConfig) {
verifyProperty(VehicleProperty::SEAT_AIRBAGS_DEPLOYED, VehiclePropertyAccess::READ,
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
index 7b98634..789e8a1 100644
--- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
@@ -2583,6 +2583,10 @@
TEST_P(BluetoothAudioProviderLeAudioOutputHardwareAidl,
GetDataPathConfiguration) {
+ if (GetProviderFactoryInterfaceVersion() <
+ BluetoothAudioHalVersion::VERSION_AIDL_V4) {
+ GTEST_SKIP();
+ }
IBluetoothAudioProvider::StreamConfig sink_requirement;
IBluetoothAudioProvider::StreamConfig source_requirement;
std::vector<IBluetoothAudioProvider::LeAudioDataPathConfiguration>
diff --git a/bluetooth/finder/aidl/Android.bp b/bluetooth/finder/aidl/Android.bp
index 24f5ca5..25c1287 100644
--- a/bluetooth/finder/aidl/Android.bp
+++ b/bluetooth/finder/aidl/Android.bp
@@ -33,6 +33,9 @@
apex_available: [
"com.android.tethering",
],
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ },
},
},
}
diff --git a/bluetooth/finder/aidl/lint-baseline.xml b/bluetooth/finder/aidl/lint-baseline.xml
new file mode 100644
index 0000000..e0570f6
--- /dev/null
+++ b/bluetooth/finder/aidl/lint-baseline.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.4.0-alpha01" type="baseline" client="" dependencies="true" name="" variant="all" version="8.4.0-alpha01">
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 33 (current min is 30): `android.os.Parcel#writeFixedArray`"
+ errorLine1=" _aidl_parcel.writeFixedArray(bytes, _aidl_flag, 20);"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="out/soong/.intermediates/hardware/interfaces/bluetooth/finder/aidl/android.hardware.bluetooth.finder-V1-java-source/gen/android/hardware/bluetooth/finder/Eid.java"
+ line="28"
+ column="18"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 33 (current min is 30): `android.os.Parcel#createFixedArray`"
+ errorLine1=" bytes = _aidl_parcel.createFixedArray(byte[].class, 20);"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="out/soong/.intermediates/hardware/interfaces/bluetooth/finder/aidl/android.hardware.bluetooth.finder-V1-java-source/gen/android/hardware/bluetooth/finder/Eid.java"
+ line="41"
+ column="28"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+ errorLine1=" this.markVintfStability();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="out/soong/.intermediates/hardware/interfaces/bluetooth/finder/aidl/android.hardware.bluetooth.finder-V1-java-source/gen/android/hardware/bluetooth/finder/IBluetoothFinder.java"
+ line="67"
+ column="12"/>
+ </issue>
+
+</issues>
diff --git a/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp b/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp
index cca4b8c..78fcf27 100644
--- a/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp
+++ b/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp
@@ -455,6 +455,25 @@
mTunerCallback->reset();
}
+TEST_F(DefaultBroadcastRadioHalTest, SetConfigFlag) {
+ ConfigFlag flag = ConfigFlag::FORCE_MONO;
+
+ auto setResult = mBroadcastRadioHal->setConfigFlag(flag, /* value= */ true);
+
+ ASSERT_TRUE(setResult.isOk());
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, GetConfigFlag) {
+ bool gotValue = false;
+ ConfigFlag flag = ConfigFlag::FORCE_MONO;
+ mBroadcastRadioHal->setConfigFlag(flag, /* value= */ true);
+
+ auto getResult = mBroadcastRadioHal->isConfigFlagSet(flag, &gotValue);
+
+ ASSERT_TRUE(getResult.isOk());
+ ASSERT_TRUE(gotValue);
+}
+
TEST_F(DefaultBroadcastRadioHalTest, StartProgramListUpdatesWithEmptyFilter) {
switchToFmBand();
@@ -482,4 +501,17 @@
}
}
+TEST_F(DefaultBroadcastRadioHalTest, StartProgramListUpdatesWhenHdIsDisabled) {
+ switchToFmBand();
+ mBroadcastRadioHal->setConfigFlag(ConfigFlag::FORCE_ANALOG_FM, /* value= */ true);
+
+ auto programList = getProgramList();
+
+ ASSERT_TRUE(programList.has_value());
+ for (auto it = programList->begin(); it != programList->end(); it++) {
+ EXPECT_FALSE(utils::hasId(it->selector, IdentifierType::HD_STATION_ID_EXT));
+ EXPECT_EQ(utils::getBand(utils::getAmFmFrequency(it->selector)), utils::FrequencyBand::FM);
+ }
+}
+
} // namespace aidl::android::hardware::broadcastradio
diff --git a/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp b/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp
index 4778020..0430ea7 100644
--- a/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp
+++ b/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp
@@ -144,7 +144,8 @@
auto status = mAllocator->getIMapperLibrarySuffix(&mapperSuffix);
ASSERT_TRUE(status.isOk());
std::string lib_name = "mapper." + mapperSuffix + ".so";
- void* so = android_load_sphal_library(lib_name.c_str(), RTLD_LOCAL | RTLD_NOW);
+ void* so = AServiceManager_openDeclaredPassthroughHal("mapper", mapperSuffix.c_str(),
+ RTLD_LOCAL | RTLD_NOW);
ASSERT_NE(nullptr, so) << "Failed to load " << lib_name;
auto loadIMapper = (AIMapper_loadIMapperFn)dlsym(so, "AIMapper_loadIMapper");
ASSERT_NE(nullptr, loadIMapper) << "AIMapper_locaIMapper missing from " << lib_name;
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/.hash b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/.hash
index 66b5d13..babbf24 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/.hash
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/.hash
@@ -1 +1,2 @@
f5bdf5724a941dc7e5e7d0ebe9dfe028f7bcc25f
+71da13748094aa53237dd6eeac04f0f9add80aa1
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/android/hardware/graphics/common/BufferUsage.aidl
index 58eefc4..cb5bc9e 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/1/android/hardware/graphics/common/BufferUsage.aidl
@@ -42,6 +42,6 @@
GPU_MIPMAP_COMPLETE = 67108864,
HW_IMAGE_ENCODER = 134217728,
GPU_DATA_BUFFER = 16777216,
- VENDOR_MASK = -268435456,
+ VENDOR_MASK = 4026531840,
VENDOR_MASK_HI = -281474976710656,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/.hash b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/.hash
index 167ed0e..54f8f32 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/.hash
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/.hash
@@ -1 +1,2 @@
bd2f5e2ab1d5112dfe982f64012e425f544c9d60
+4279f88ef38c8fdeea6797410b464ae29df34e72
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/android/hardware/graphics/common/BufferUsage.aidl
index b4ef451..5e23bcc 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/2/android/hardware/graphics/common/BufferUsage.aidl
@@ -58,6 +58,6 @@
GPU_MIPMAP_COMPLETE = 67108864,
HW_IMAGE_ENCODER = 134217728,
GPU_DATA_BUFFER = 16777216,
- VENDOR_MASK = -268435456,
+ VENDOR_MASK = 4026531840,
VENDOR_MASK_HI = -281474976710656,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/.hash b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/.hash
index dfda68f..53eb6bd 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/.hash
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/.hash
@@ -1 +1,2 @@
e7e8b0bd7cd27ab4f1998700ef19ebc82e022d87
+37aa15ac89ae27f3f89099d79609f5aaa1717de5
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/android/hardware/graphics/common/BufferUsage.aidl
index d3ab44f..f91625f 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/3/android/hardware/graphics/common/BufferUsage.aidl
@@ -60,6 +60,6 @@
GPU_MIPMAP_COMPLETE = 67108864,
HW_IMAGE_ENCODER = 134217728,
FRONT_BUFFER = 4294967296,
- VENDOR_MASK = -268435456,
+ VENDOR_MASK = 4026531840,
VENDOR_MASK_HI = -281474976710656,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/.hash b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/.hash
index ef17b34..fe20ff9 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/.hash
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/.hash
@@ -1 +1,2 @@
9bcf4b83485ce912dc39108201504f77b8c96cef
+adb71c34ba271f87c6431845b310777c1e611ebf
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/android/hardware/graphics/common/BufferUsage.aidl
index d42a6d5..52b2a56 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/4/android/hardware/graphics/common/BufferUsage.aidl
@@ -60,6 +60,6 @@
GPU_MIPMAP_COMPLETE = (1 << 26) /* 67108864 */,
HW_IMAGE_ENCODER = (1 << 27) /* 134217728 */,
FRONT_BUFFER = (1L << 32) /* 4294967296 */,
- VENDOR_MASK = (0xf << 28) /* -268435456 */,
+ VENDOR_MASK = (0xfL << 28) /* 4026531840 */,
VENDOR_MASK_HI = ((1L * 0xffff) << 48) /* -281474976710656 */,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
index d42a6d5..52b2a56 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
@@ -60,6 +60,6 @@
GPU_MIPMAP_COMPLETE = (1 << 26) /* 67108864 */,
HW_IMAGE_ENCODER = (1 << 27) /* 134217728 */,
FRONT_BUFFER = (1L << 32) /* 4294967296 */,
- VENDOR_MASK = (0xf << 28) /* -268435456 */,
+ VENDOR_MASK = (0xfL << 28) /* 4026531840 */,
VENDOR_MASK_HI = ((1L * 0xffff) << 48) /* -281474976710656 */,
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
index 0d1a094..7d39d95 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
@@ -150,7 +150,7 @@
FRONT_BUFFER = 1L << 32,
/** bits 28-31 are reserved for vendor extensions */
- VENDOR_MASK = 0xf << 28,
+ VENDOR_MASK = 0xfL << 28,
/** bits 33-47 must be zero and are reserved for future versions */
/** bits 48-63 are reserved for vendor extensions */
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 5e45fd9..f72cf55 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -1291,6 +1291,9 @@
frameIntervalPowerHints.cend());
EXPECT_LE(minFrameInterval->frameIntervalNs,
VtsComposerClient::kMaxFrameIntervalNs);
+ const auto maxFrameInterval = *max_element(frameIntervalPowerHints.cbegin(),
+ frameIntervalPowerHints.cend());
+ EXPECT_GE(maxFrameInterval->frameIntervalNs, vrrConfig.minFrameIntervalNs);
EXPECT_TRUE(std::all_of(frameIntervalPowerHints.cbegin(),
frameIntervalPowerHints.cend(),
@@ -1385,17 +1388,6 @@
}
}
-// TODO(b/291792736) Add detailed VTS test cases for NotifyExpectedPresent
-TEST_P(GraphicsComposerAidlV3Test, NotifyExpectedPresent) {
- for (const auto& display : mDisplays) {
- EXPECT_TRUE(mComposerClient
- ->notifyExpectedPresent(display.getDisplayId(),
- ClockMonotonicTimestamp{0},
- std::chrono::nanoseconds{8ms}.count())
- .isOk());
- }
-}
-
// Tests for Command.
class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
protected:
@@ -1539,18 +1531,20 @@
}
sp<::android::Fence> presentAndGetFence(
- std::optional<ClockMonotonicTimestamp> expectedPresentTime) {
- auto& writer = getWriter(getPrimaryDisplayId());
- writer.validateDisplay(getPrimaryDisplayId(), expectedPresentTime,
- VtsComposerClient::kNoFrameIntervalNs);
+ std::optional<ClockMonotonicTimestamp> expectedPresentTime,
+ std::optional<int64_t> displayIdOpt = {},
+ int32_t frameIntervalNs = VtsComposerClient::kNoFrameIntervalNs) {
+ const auto displayId = displayIdOpt.value_or(getPrimaryDisplayId());
+ auto& writer = getWriter(displayId);
+ writer.validateDisplay(displayId, expectedPresentTime, frameIntervalNs);
execute();
EXPECT_TRUE(mReader.takeErrors().empty());
- writer.presentDisplay(getPrimaryDisplayId());
+ writer.presentDisplay(displayId);
execute();
EXPECT_TRUE(mReader.takeErrors().empty());
- auto presentFence = mReader.takePresentFence(getPrimaryDisplayId());
+ auto presentFence = mReader.takePresentFence(displayId);
// take ownership
const int fenceOwner = presentFence.get();
*presentFence.getR() = -1;
@@ -1569,18 +1563,17 @@
return vsyncPeriod;
}
- int64_t createOnScreenLayer(Composition composition = Composition::DEVICE) {
- auto& writer = getWriter(getPrimaryDisplayId());
+ int64_t createOnScreenLayer(const VtsDisplay& display,
+ Composition composition = Composition::DEVICE) {
+ auto& writer = getWriter(display.getDisplayId());
const auto& [status, layer] =
- mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount, &writer);
+ mComposerClient->createLayer(display.getDisplayId(), kBufferSlotCount, &writer);
EXPECT_TRUE(status.isOk());
- Rect displayFrame{0, 0, getPrimaryDisplay().getDisplayWidth(),
- getPrimaryDisplay().getDisplayHeight()};
- FRect cropRect{0, 0, (float)getPrimaryDisplay().getDisplayWidth(),
- (float)getPrimaryDisplay().getDisplayHeight()};
- configureLayer(getPrimaryDisplay(), layer, composition, displayFrame, cropRect);
+ Rect displayFrame{0, 0, display.getDisplayWidth(), display.getDisplayHeight()};
+ FRect cropRect{0, 0, (float)display.getDisplayWidth(), (float)display.getDisplayHeight()};
+ configureLayer(display, layer, composition, displayFrame, cropRect);
- writer.setLayerDataspace(getPrimaryDisplayId(), layer, common::Dataspace::UNKNOWN);
+ writer.setLayerDataspace(display.getDisplayId(), layer, common::Dataspace::UNKNOWN);
return layer;
}
@@ -1692,7 +1685,7 @@
ASSERT_NE(nullptr, buffer1);
ASSERT_NE(nullptr, buffer2);
- const auto layer = createOnScreenLayer();
+ const auto layer = createOnScreenLayer(getPrimaryDisplay());
auto& writer = getWriter(getPrimaryDisplayId());
writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, buffer1->handle,
/*acquireFence*/ -1);
@@ -1725,6 +1718,38 @@
ASSERT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::OFF).isOk());
}
+ void forEachNotifyExpectedPresentConfig(
+ std::function<void(VtsDisplay&, const DisplayConfiguration&)> func) {
+ for (VtsDisplay& display : mDisplays) {
+ const auto displayId = display.getDisplayId();
+ EXPECT_TRUE(mComposerClient->setPowerMode(displayId, PowerMode::ON).isOk());
+ const auto& [status, displayConfigurations] =
+ mComposerClient->getDisplayConfigurations(displayId);
+ EXPECT_TRUE(status.isOk());
+ EXPECT_FALSE(displayConfigurations.empty());
+ for (const auto& config : displayConfigurations) {
+ if (config.vrrConfig && config.vrrConfig->notifyExpectedPresentConfig) {
+ const auto [vsyncPeriodStatus, oldVsyncPeriod] =
+ mComposerClient->getDisplayVsyncPeriod(displayId);
+ ASSERT_TRUE(vsyncPeriodStatus.isOk());
+ const auto& [timelineStatus, timeline] =
+ mComposerClient->setActiveConfigWithConstraints(
+ &display, config.configId,
+ VsyncPeriodChangeConstraints{.seamlessRequired = false});
+ ASSERT_TRUE(timelineStatus.isOk());
+ if (timeline.refreshRequired) {
+ sendRefreshFrame(display, &timeline);
+ }
+ waitForVsyncPeriodChange(displayId, timeline, systemTime(), oldVsyncPeriod,
+ config.vsyncPeriod);
+ func(display, config);
+ }
+ }
+ EXPECT_TRUE(
+ mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::OFF).isOk());
+ }
+ }
+
void configureLayer(const VtsDisplay& display, int64_t layer, Composition composition,
const Rect& displayFrame, const FRect& cropRect) {
auto& writer = getWriter(display.getDisplayId());
@@ -2592,7 +2617,7 @@
const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
ASSERT_NE(nullptr, buffer->handle);
- const auto layer = createOnScreenLayer();
+ const auto layer = createOnScreenLayer(getPrimaryDisplay());
auto& writer = getWriter(getPrimaryDisplayId());
writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
@@ -2778,8 +2803,8 @@
}
// Send the REFRESH_RATE_INDICATOR update
- ASSERT_NO_FATAL_FAILURE(
- sendBufferUpdate(createOnScreenLayer(Composition::REFRESH_RATE_INDICATOR)));
+ ASSERT_NO_FATAL_FAILURE(sendBufferUpdate(
+ createOnScreenLayer(getPrimaryDisplay(), Composition::REFRESH_RATE_INDICATOR)));
std::this_thread::sleep_for(1s);
EXPECT_FALSE(checkIfCallbackRefreshRateChangedDebugEnabledReceived(displayFilter))
<< "A callback should not be received for REFRESH_RATE_INDICATOR";
@@ -3075,6 +3100,141 @@
ASSERT_TRUE(errors.size() == 1 && errors[0].errorCode == IComposerClient::EX_BAD_LAYER);
}
+TEST_P(GraphicsComposerAidlCommandV3Test, notifyExpectedPresentTimeout) {
+ if (hasCapability(Capability::PRESENT_FENCE_IS_NOT_RELIABLE)) {
+ GTEST_SUCCEED() << "Device has unreliable present fences capability, skipping";
+ return;
+ }
+ forEachNotifyExpectedPresentConfig([&](VtsDisplay& display,
+ const DisplayConfiguration& config) {
+ const auto displayId = display.getDisplayId();
+ auto minFrameIntervalNs = config.vrrConfig->minFrameIntervalNs;
+ const auto timeoutNs = config.vrrConfig->notifyExpectedPresentConfig->timeoutNs;
+
+ const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer);
+ const auto layer = createOnScreenLayer(display);
+ auto& writer = getWriter(displayId);
+ writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+ /*acquireFence*/ -1);
+ sp<::android::Fence> presentFence = presentAndGetFence(ComposerClientWriter::kNoTimestamp,
+ displayId, minFrameIntervalNs);
+ presentFence->waitForever(LOG_TAG);
+ auto lastPresentTimeNs = presentFence->getSignalTime();
+
+ // Frame presents 30ms after timeout
+ const auto timeout = static_cast<const std::chrono::nanoseconds>(timeoutNs);
+ const auto vsyncPeriod = config.vsyncPeriod;
+ int32_t frameAfterTimeoutNs =
+ vsyncPeriod * static_cast<int32_t>((timeout + 30ms).count() / vsyncPeriod);
+ auto expectedPresentTimestamp =
+ ClockMonotonicTimestamp{lastPresentTimeNs + frameAfterTimeoutNs};
+ std::this_thread::sleep_for(timeout);
+ mComposerClient->notifyExpectedPresent(displayId, expectedPresentTimestamp,
+ minFrameIntervalNs);
+ presentFence = presentAndGetFence(expectedPresentTimestamp, displayId, minFrameIntervalNs);
+ presentFence->waitForever(LOG_TAG);
+ lastPresentTimeNs = presentFence->getSignalTime();
+ ASSERT_GE(lastPresentTimeNs, expectedPresentTimestamp.timestampNanos - vsyncPeriod / 2);
+ mComposerClient->destroyLayer(displayId, layer, &writer);
+ });
+}
+
+TEST_P(GraphicsComposerAidlCommandV3Test, notifyExpectedPresentFrameIntervalChange) {
+ if (hasCapability(Capability::PRESENT_FENCE_IS_NOT_RELIABLE)) {
+ GTEST_SUCCEED() << "Device has unreliable present fences capability, skipping";
+ return;
+ }
+ forEachNotifyExpectedPresentConfig([&](VtsDisplay& display,
+ const DisplayConfiguration& config) {
+ const auto displayId = display.getDisplayId();
+ const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer);
+ const auto layer = createOnScreenLayer(display);
+ auto& writer = getWriter(displayId);
+ writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+ /*acquireFence*/ -1);
+ auto minFrameIntervalNs = config.vrrConfig->minFrameIntervalNs;
+ sp<::android::Fence> presentFence = presentAndGetFence(ComposerClientWriter::kNoTimestamp,
+ displayId, minFrameIntervalNs);
+ presentFence->waitForever(LOG_TAG);
+ auto lastPresentTimeNs = presentFence->getSignalTime();
+
+ auto vsyncPeriod = config.vsyncPeriod;
+ int32_t highestDivisor = VtsComposerClient::kMaxFrameIntervalNs / vsyncPeriod;
+ int32_t lowestDivisor = minFrameIntervalNs / vsyncPeriod;
+ const auto headsUpNs = config.vrrConfig->notifyExpectedPresentConfig->headsUpNs;
+ float totalDivisorsPassed = 0.f;
+ for (int divisor = lowestDivisor; divisor <= highestDivisor; divisor++) {
+ const auto frameIntervalNs = vsyncPeriod * divisor;
+ const auto frameAfterHeadsUp = frameIntervalNs * (headsUpNs / frameIntervalNs);
+ auto presentTime = lastPresentTimeNs + frameIntervalNs + frameAfterHeadsUp;
+ const auto expectedPresentTimestamp = ClockMonotonicTimestamp{presentTime};
+ ASSERT_TRUE(mComposerClient
+ ->notifyExpectedPresent(displayId, expectedPresentTimestamp,
+ frameIntervalNs)
+ .isOk());
+ presentFence = presentAndGetFence(expectedPresentTimestamp, displayId, frameIntervalNs);
+ presentFence->waitForever(LOG_TAG);
+ lastPresentTimeNs = presentFence->getSignalTime();
+ if (lastPresentTimeNs >= expectedPresentTimestamp.timestampNanos - vsyncPeriod / 2) {
+ ++totalDivisorsPassed;
+ }
+ }
+ EXPECT_TRUE(totalDivisorsPassed >
+ (static_cast<float>(highestDivisor - lowestDivisor)) * 0.75f);
+ mComposerClient->destroyLayer(displayId, layer, &writer);
+ });
+}
+
+TEST_P(GraphicsComposerAidlCommandV3Test, frameIntervalChangeAtPresentFrame) {
+ if (hasCapability(Capability::PRESENT_FENCE_IS_NOT_RELIABLE)) {
+ GTEST_SUCCEED() << "Device has unreliable present fences capability, skipping";
+ return;
+ }
+ forEachNotifyExpectedPresentConfig([&](VtsDisplay& display,
+ const DisplayConfiguration& config) {
+ const auto displayId = display.getDisplayId();
+ const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer);
+ const auto layer = createOnScreenLayer(display);
+ auto& writer = getWriter(displayId);
+ writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+ /*acquireFence*/ -1);
+ auto minFrameIntervalNs = config.vrrConfig->minFrameIntervalNs;
+
+ auto vsyncPeriod = config.vsyncPeriod;
+ int32_t highestDivisor = VtsComposerClient::kMaxFrameIntervalNs / vsyncPeriod;
+ int32_t lowestDivisor = minFrameIntervalNs / vsyncPeriod;
+ const auto headsUpNs = config.vrrConfig->notifyExpectedPresentConfig->headsUpNs;
+ float totalDivisorsPassed = 0.f;
+ int divisor = lowestDivisor;
+ auto frameIntervalNs = vsyncPeriod * divisor;
+ sp<::android::Fence> presentFence =
+ presentAndGetFence(ComposerClientWriter::kNoTimestamp, displayId, frameIntervalNs);
+ presentFence->waitForever(LOG_TAG);
+ auto lastPresentTimeNs = presentFence->getSignalTime();
+ do {
+ frameIntervalNs = vsyncPeriod * divisor;
+ ++divisor;
+ const auto nextFrameIntervalNs = vsyncPeriod * divisor;
+ const auto frameAfterHeadsUp = frameIntervalNs * (headsUpNs / frameIntervalNs);
+ auto presentTime = lastPresentTimeNs + frameIntervalNs + frameAfterHeadsUp;
+ const auto expectedPresentTimestamp = ClockMonotonicTimestamp{presentTime};
+ presentFence =
+ presentAndGetFence(expectedPresentTimestamp, displayId, nextFrameIntervalNs);
+ presentFence->waitForever(LOG_TAG);
+ lastPresentTimeNs = presentFence->getSignalTime();
+ if (lastPresentTimeNs >= expectedPresentTimestamp.timestampNanos - vsyncPeriod / 2) {
+ ++totalDivisorsPassed;
+ }
+ } while (divisor < highestDivisor);
+ EXPECT_TRUE(totalDivisorsPassed >
+ (static_cast<float>(highestDivisor - lowestDivisor)) * 0.75f);
+ mComposerClient->destroyLayer(displayId, layer, &writer);
+ });
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, GraphicsComposerAidlCommandTest,
diff --git a/power/stats/aidl/vts/VtsHalPowerStatsTargetTest.cpp b/power/stats/aidl/vts/VtsHalPowerStatsTargetTest.cpp
index 4ee14e3..edc25b8 100644
--- a/power/stats/aidl/vts/VtsHalPowerStatsTargetTest.cpp
+++ b/power/stats/aidl/vts/VtsHalPowerStatsTargetTest.cpp
@@ -65,10 +65,10 @@
template <typename T, typename S, typename R>
void testMatching(std::vector<T> const& c1, R T::*f1, std::vector<S> const& c2, R S::*f2);
- bool containsTimedEntity(const std::string& str);
+ bool isEntitySkipped(const std::string& str);
- void excludeTimedEntities(std::vector<PowerEntity>* entities,
- std::vector<StateResidencyResult>* results);
+ void excludeSkippedEntities(std::vector<PowerEntity>* entities,
+ std::vector<StateResidencyResult>* results);
std::shared_ptr<IPowerStats> powerstats;
};
@@ -116,15 +116,20 @@
EXPECT_EQ(c1fields, c2fields);
}
-bool PowerStatsAidl::containsTimedEntity(const std::string& str) {
+bool PowerStatsAidl::isEntitySkipped(const std::string& str) {
+ bool skip = false;
// TODO(b/229698505): Extend PowerEntityInfo to identify timed power entity
- return str.find("AoC") != std::string::npos;
+ skip |= str.find("AoC") != std::string::npos;
+ // Lassen GNSS power stats will be present after running GPS session once.
+ // Otherwise, VTS will fail due to missing GPS power stats.
+ skip |= str.find("GPS") != std::string::npos;
+ return skip;
}
-void PowerStatsAidl::excludeTimedEntities(std::vector<PowerEntity>* entities,
- std::vector<StateResidencyResult>* results) {
+void PowerStatsAidl::excludeSkippedEntities(std::vector<PowerEntity>* entities,
+ std::vector<StateResidencyResult>* results) {
for (auto it = entities->begin(); it != entities->end(); it++) {
- if (containsTimedEntity((*it).name)) {
+ if (isEntitySkipped((*it).name)) {
auto entityId = (*it).id;
entities->erase(it--);
@@ -214,19 +219,19 @@
}
// State residency must return all results except timed power entities
-TEST_P(PowerStatsAidl, TestGetStateResidencyAllResultsExceptTimedEntities) {
+TEST_P(PowerStatsAidl, TestGetStateResidencyAllResultsExceptSkippedEntities) {
std::vector<PowerEntity> entities;
ASSERT_OK(powerstats->getPowerEntityInfo(&entities));
std::vector<StateResidencyResult> results;
ASSERT_OK(powerstats->getStateResidency({}, &results));
- excludeTimedEntities(&entities, &results);
+ excludeSkippedEntities(&entities, &results);
testMatching(entities, &PowerEntity::id, results, &StateResidencyResult::id);
}
// Each result must contain all state residencies except timed power entities
-TEST_P(PowerStatsAidl, TestGetStateResidencyAllStateResidenciesExceptTimedEntities) {
+TEST_P(PowerStatsAidl, TestGetStateResidencyAllStateResidenciesExceptSkippedEntities) {
std::vector<PowerEntity> entities;
ASSERT_OK(powerstats->getPowerEntityInfo(&entities));
@@ -234,7 +239,7 @@
ASSERT_OK(powerstats->getStateResidency({}, &results));
for (auto entity : entities) {
- if (!containsTimedEntity(entity.name)) {
+ if (!isEntitySkipped(entity.name)) {
auto it = std::find_if(results.begin(), results.end(),
[&entity](const auto& x) { return x.id == entity.id; });
ASSERT_NE(it, results.end());
@@ -255,7 +260,7 @@
std::vector<PowerEntity> selectedEntities = getRandomSubset(entities);
std::vector<int32_t> selectedIds;
for (auto it = selectedEntities.begin(); it != selectedEntities.end(); it++) {
- if (!containsTimedEntity((*it).name)) {
+ if (!isEntitySkipped((*it).name)) {
selectedIds.push_back((*it).id);
} else {
selectedEntities.erase(it--);
diff --git a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
index 403c6c8..4208d09 100644
--- a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
+++ b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
@@ -20,6 +20,7 @@
#include <memory>
#include <string>
#include <thread>
+#include <unordered_map>
#include <vector>
#define LOG_TAG "thermal_aidl_hal_test"
@@ -333,6 +334,49 @@
}
}
+// Test Thermal->getTemperatureThresholdsWithType(SKIN).
+// @VsrTest = GMS-VSR-3.2.5-001
+// @VsrTest = VSR-3.2.5-001
+// @VsrTest = GMS-VSR-3.2.5-002
+// @VsrTest = VSR-3.2.5-002
+TEST_P(ThermalAidlTest, SkinTemperatureThresholdsTest) {
+ auto apiLevel = ::android::base::GetIntProperty<int32_t>("ro.vendor.api_level", 0);
+ if (apiLevel < 35) {
+ GTEST_SKIP() << "Skipping test as the vendor level is below 35: " << apiLevel;
+ }
+ std::vector<Temperature> temperatures;
+ ::ndk::ScopedAStatus status =
+ mThermal->getTemperaturesWithType(TemperatureType::SKIN, &temperatures);
+ ASSERT_TRUE(status.isOk()) << "getTemperaturesWithType(SKIN) failed";
+ ASSERT_FALSE(temperatures.empty()) << "getTemperaturesWithType(SKIN) returns empty";
+ ASSERT_EQ(1, temperatures.size())
+ << "getTemperaturesWithType(SKIN) returns multiple temperatures";
+
+ std::vector<TemperatureThreshold> thresholds;
+ status = mThermal->getTemperatureThresholdsWithType(TemperatureType::SKIN, &thresholds);
+ ASSERT_TRUE(status.isOk()) << "getTemperatureThresholdsWithType(SKIN) failed";
+ ASSERT_FALSE(thresholds.empty()) << "getTemperatureThresholdsWithType(SKIN) returns empty";
+ ASSERT_EQ(1, thresholds.size())
+ << "getTemperatureThresholdsWithType(SKIN) returns multiple thresholds";
+ auto temperature = temperatures[0];
+ auto threshold = thresholds[0];
+ ASSERT_EQ(temperature.name, threshold.name);
+ auto severities = ::ndk::enum_range<ThrottlingSeverity>();
+ auto cardinality = std::distance(severities.begin(), severities.end());
+ ASSERT_NE(NAN, temperature.value);
+ ASSERT_EQ(cardinality, threshold.hotThrottlingThresholds.size());
+ float lastThreshold = threshold.hotThrottlingThresholds[1];
+ // skip NONE, and check that the rest should be set and non-decreasing
+ for (auto i = 2; i < cardinality; i++) {
+ float t = threshold.hotThrottlingThresholds[i];
+ ASSERT_NE(NAN, t);
+ ASSERT_TRUE(t >= lastThreshold) << "Temperature thresholds should be non-decreasing "
+ << "but got " << t << " for status " << i << " and "
+ << lastThreshold << " for status " << i - 1;
+ lastThreshold = t;
+ }
+}
+
// Test Thermal->getCoolingDevices().
TEST_P(ThermalAidlTest, CoolingDeviceTest) {
std::vector<CoolingDevice> ret;
diff --git a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
index fa7149f..e456e49 100644
--- a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
@@ -74,7 +74,17 @@
return testing::deviceSupportsFeature("com.google.android.tv.mdns_offload");
}
- // Detected panel TV device by using ro.oem.key1 property.
+ bool doesDeviceSupportFullNetworkingUnder2w() {
+ return testing::deviceSupportsFeature("com.google.android.tv.full_networking_under_2w");
+ }
+
+ // Detect TV devices.
+ bool isTvDevice() {
+ return testing::deviceSupportsFeature("android.software.leanback") ||
+ testing::deviceSupportsFeature("android.hardware.type.television");
+ }
+
+ // Detect Panel TV devices by using ro.oem.key1 property.
// https://docs.partner.android.com/tv/build/platform/props-vars/ro-oem-key1
bool isPanelTvDevice() {
const std::string oem_key1 = getPropertyString("ro.oem.key1");
@@ -135,10 +145,23 @@
*/
// @VsrTest = 5.3.12
TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
- // Flat panel TV devices that support MDNS offload do not have to implement APF if the WiFi
- // chipset does not have sufficient RAM to do so.
- if (isPanelTvDevice() && isMdnsOffloadPresentInNIC()) {
- GTEST_SKIP() << "Panel TV supports mDNS offload. It is not required to support APF";
+ const std::string oem_key1 = getPropertyString("ro.oem.key1");
+ if (isTvDevice()) {
+ // Flat panel TV devices that support MDNS offload do not have to implement APF if the WiFi
+ // chipset does not have sufficient RAM to do so.
+ if (isPanelTvDevice() && isMdnsOffloadPresentInNIC()) {
+ GTEST_SKIP() << "Panel TV supports mDNS offload. It is not required to support APF";
+ }
+ // For TV devices declaring the
+ // com.google.android.tv.full_networking_under_2w feature, this indicates
+ // the device can meet the <= 2W standby power requirement while
+ // continuously processing network packets on the CPU, even in standby mode.
+ // In these cases, APF support is strongly recommended rather than being
+ // mandatory.
+ if (doesDeviceSupportFullNetworkingUnder2w()) {
+ GTEST_SKIP() << "TV Device meets the <= 2W standby power demand requirement. It is not "
+ "required to support APF.";
+ }
}
int vendor_api_level = property_get_int32("ro.vendor.api_level", 0);
// Before VSR 14, APF support is optional.