Merge "Audio V4: Add metadata update to legacy API" into pi-dev
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index 902a4e8..3e32b3e 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -43,7 +43,6 @@
"VehicleAreaWindow",
"VehicleAreaZone",
"VehicleDisplay",
- "VehicleDrivingStatus",
"VehicleGear",
"VehicleHvacFanDirection",
"VehicleHwKeyInputAction",
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehiclePropertyStore.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehiclePropertyStore.h
index eda94b7..0a243fe 100644
--- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehiclePropertyStore.h
+++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehiclePropertyStore.h
@@ -67,7 +67,7 @@
/* Stores provided value. Returns true if value was written returns false if config for
* example wasn't registered. */
- bool writeValue(const VehiclePropValue& propValue);
+ bool writeValue(const VehiclePropValue& propValue, bool updateStatus);
void removeValue(const VehiclePropValue& propValue);
void removeValuesForProperty(int32_t propId);
diff --git a/automotive/vehicle/2.0/default/common/src/VehiclePropertyStore.cpp b/automotive/vehicle/2.0/default/common/src/VehiclePropertyStore.cpp
index f2aa421..94ace45 100644
--- a/automotive/vehicle/2.0/default/common/src/VehiclePropertyStore.cpp
+++ b/automotive/vehicle/2.0/default/common/src/VehiclePropertyStore.cpp
@@ -41,7 +41,8 @@
mConfigs.insert({ config.prop, RecordConfig { config, tokenFunc } });
}
-bool VehiclePropertyStore::writeValue(const VehiclePropValue& propValue) {
+bool VehiclePropertyStore::writeValue(const VehiclePropValue& propValue,
+ bool updateStatus) {
MuxGuard g(mLock);
if (!mConfigs.count(propValue.prop)) return false;
@@ -52,7 +53,9 @@
} else {
valueToUpdate->timestamp = propValue.timestamp;
valueToUpdate->value = propValue.value;
- valueToUpdate->status = propValue.status;
+ if (updateStatus) {
+ valueToUpdate->status = propValue.status;
+ }
}
return true;
}
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index e05b333..479f8af 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -346,14 +346,6 @@
{.config =
{
- .prop = toInt(VehicleProperty::DRIVING_STATUS),
- .access = VehiclePropertyAccess::READ,
- .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
- },
- .initialValue = {.int32Values = {toInt(VehicleDrivingStatus::UNRESTRICTED)}}},
-
- {.config =
- {
.prop = toInt(VehicleProperty::GEAR_SELECTION),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
index d51576e..3979ac2 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
@@ -127,6 +127,8 @@
}
StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
+ static constexpr bool shouldUpdateStatus = false;
+
if (propValue.prop == kGenerateFakeDataControllingProperty) {
StatusCode status = handleGenerateFakeDataRequest(propValue);
if (status != StatusCode::OK) {
@@ -177,7 +179,7 @@
return StatusCode::NOT_AVAILABLE;
}
- if (!mPropStore->writeValue(propValue)) {
+ if (!mPropStore->writeValue(propValue, shouldUpdateStatus)) {
return StatusCode::INVALID_ARG;
}
@@ -199,6 +201,8 @@
// Parse supported properties list and generate vector of property values to hold current values.
void EmulatedVehicleHal::onCreate() {
+ static constexpr bool shouldUpdateStatus = true;
+
for (auto& it : kVehicleProperties) {
VehiclePropConfig cfg = it.config;
int32_t numAreas = cfg.areaConfigs.size();
@@ -240,7 +244,7 @@
} else {
prop.value = it.initialValue;
}
- mPropStore->writeValue(prop);
+ mPropStore->writeValue(prop, shouldUpdateStatus);
}
}
initObd2LiveFrame(*mPropStore->getConfigOrDie(OBD2_LIVE_FRAME));
@@ -300,6 +304,8 @@
}
bool EmulatedVehicleHal::setPropertyFromVehicle(const VehiclePropValue& propValue) {
+ static constexpr bool shouldUpdateStatus = true;
+
if (propValue.prop == kGenerateFakeDataControllingProperty) {
StatusCode status = handleGenerateFakeDataRequest(propValue);
if (status != StatusCode::OK) {
@@ -307,7 +313,7 @@
}
}
- if (mPropStore->writeValue(propValue)) {
+ if (mPropStore->writeValue(propValue, shouldUpdateStatus)) {
doHalEvent(getValuePool()->obtain(propValue));
return true;
} else {
@@ -391,6 +397,8 @@
}
void EmulatedVehicleHal::onFakeValueGenerated(int32_t propId, float value) {
+ static constexpr bool shouldUpdateStatus = false;
+
VehiclePropValuePtr updatedPropValue {};
switch (getPropType(propId)) {
case VehiclePropertyType::FLOAT:
@@ -410,7 +418,7 @@
updatedPropValue->areaId = 0; // Add area support if necessary.
updatedPropValue->timestamp = elapsedRealtimeNano();
updatedPropValue->status = VehiclePropertyStatus::AVAILABLE;
- mPropStore->writeValue(*updatedPropValue);
+ mPropStore->writeValue(*updatedPropValue, shouldUpdateStatus);
auto changeMode = mPropStore->getConfigOrDie(propId)->changeMode;
if (VehiclePropertyChangeMode::ON_CHANGE == changeMode) {
doHalEvent(move(updatedPropValue));
@@ -439,16 +447,20 @@
}
void EmulatedVehicleHal::initObd2LiveFrame(const VehiclePropConfig& propConfig) {
+ static constexpr bool shouldUpdateStatus = true;
+
auto liveObd2Frame = createVehiclePropValue(VehiclePropertyType::MIXED, 0);
auto sensorStore = fillDefaultObd2Frame(static_cast<size_t>(propConfig.configArray[0]),
static_cast<size_t>(propConfig.configArray[1]));
sensorStore->fillPropValue("", liveObd2Frame.get());
liveObd2Frame->prop = OBD2_LIVE_FRAME;
- mPropStore->writeValue(*liveObd2Frame);
+ mPropStore->writeValue(*liveObd2Frame, shouldUpdateStatus);
}
void EmulatedVehicleHal::initObd2FreezeFrame(const VehiclePropConfig& propConfig) {
+ static constexpr bool shouldUpdateStatus = true;
+
auto sensorStore = fillDefaultObd2Frame(static_cast<size_t>(propConfig.configArray[0]),
static_cast<size_t>(propConfig.configArray[1]));
@@ -460,7 +472,7 @@
sensorStore->fillPropValue(dtc, freezeFrame.get());
freezeFrame->prop = OBD2_FREEZE_FRAME;
- mPropStore->writeValue(*freezeFrame);
+ mPropStore->writeValue(*freezeFrame, shouldUpdateStatus);
}
}
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 87daedc..93a903f 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -467,19 +467,6 @@
| VehicleArea:GLOBAL),
/**
- * Driving status policy.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE
- * @access VehiclePropertyAccess:READ
- * @data_enum VehicleDrivingStatus
- */
- DRIVING_STATUS = (
- 0x0404
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:INT32
- | VehicleArea:GLOBAL),
-
- /**
* Warning for fuel low level.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -2169,20 +2156,6 @@
};
/**
- * Car states.
- *
- * The driving states determine what features of the UI will be accessible.
- */
-enum VehicleDrivingStatus : int32_t {
- UNRESTRICTED = 0x00,
- NO_VIDEO = 0x01,
- NO_KEYBOARD_INPUT = 0x02,
- NO_VOICE_INPUT = 0x04,
- NO_CONFIG = 0x08,
- LIMIT_MESSAGE_LEN = 0x10,
-};
-
-/**
* Various gears which can be selected by user and chosen in system.
*/
enum VehicleGear: int32_t {
diff --git a/compatibility_matrices/Android.mk b/compatibility_matrices/Android.mk
index a10d808..23be7de 100644
--- a/compatibility_matrices/Android.mk
+++ b/compatibility_matrices/Android.mk
@@ -21,8 +21,9 @@
# Clear potential input variables to BUILD_FRAMEWORK_COMPATIBILITY_MATRIX
LOCAL_ADD_VBMETA_VERSION :=
LOCAL_ASSEMBLE_VINTF_ENV_VARS :=
+LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE :=
+LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE :=
LOCAL_ASSEMBLE_VINTF_FLAGS :=
-LOCAL_WARN_REQUIRED_HALS :=
LOCAL_KERNEL_VERSIONS :=
LOCAL_GEN_FILE_DEPENDENCIES :=
@@ -30,18 +31,21 @@
include $(CLEAR_VARS)
+LOCAL_MODULE := framework_compatibility_matrix.legacy.xml
LOCAL_MODULE_STEM := compatibility_matrix.legacy.xml
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
include $(CLEAR_VARS)
+LOCAL_MODULE := framework_compatibility_matrix.1.xml
LOCAL_MODULE_STEM := compatibility_matrix.1.xml
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
include $(CLEAR_VARS)
+LOCAL_MODULE := framework_compatibility_matrix.2.xml
LOCAL_MODULE_STEM := compatibility_matrix.2.xml
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
LOCAL_KERNEL_VERSIONS := 3.18.0 4.4.0 4.9.0
@@ -50,6 +54,7 @@
# TODO(b/72409164): STOPSHIP: update kernel version requirements
include $(CLEAR_VARS)
+LOCAL_MODULE := framework_compatibility_matrix.current.xml
LOCAL_MODULE_STEM := compatibility_matrix.current.xml
LOCAL_SRC_FILES := $(LOCAL_MODULE_STEM)
LOCAL_KERNEL_VERSIONS := 4.4.0 4.9.0
@@ -58,9 +63,9 @@
# Framework Compatibility Matrix (common to all FCM versions)
include $(CLEAR_VARS)
-LOCAL_MODULE_STEM := compatibility_matrix.device.xml
-# define LOCAL_MODULE and LOCAL_MODULE_CLASS for local-generated-sources-dir.
LOCAL_MODULE := framework_compatibility_matrix.device.xml
+LOCAL_MODULE_STEM := compatibility_matrix.device.xml
+# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
LOCAL_MODULE_CLASS := ETC
ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
@@ -78,7 +83,7 @@
$(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_manifest_src_file)
$(my_gen_check_manifest): $(my_manifest_src_file) $(HOST_OUT_EXECUTABLES)/assemble_vintf
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
- IGNORE_TARGET_FCM_VERSION=true \
+ VINTF_IGNORE_TARGET_FCM_VERSION=true \
$(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
@@ -95,7 +100,8 @@
PLATFORM_SEPOLICY_VERSION \
PLATFORM_SEPOLICY_COMPAT_VERSIONS
-LOCAL_WARN_REQUIRED_HALS := \
+LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE := PRODUCT_ENFORCE_VINTF_MANIFEST=true
+LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE := \
"Error: DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX cannot contain required HALs."
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
@@ -121,6 +127,14 @@
LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST
+# TODO(b/65028233): Enforce no "unused HALs" for devices that does not define
+# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE as well
+ifeq (true,$(strip $(PRODUCT_ENFORCE_VINTF_MANIFEST)))
+ifdef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
+LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE := VINTF_ENFORCE_NO_UNUSED_HALS=true
+endif
+endif
+
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 486c548..467e11e 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -56,6 +56,14 @@
</interface>
</hal>
<hal format="hidl" optional="true">
+ <name>android.hardware.bluetooth.a2dp</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBluetoothAudioOffload</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
<name>android.hardware.boot</name>
<version>1.0</version>
<interface>
@@ -145,7 +153,7 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.gnss</name>
- <version>1.0</version>
+ <version>1.0-1</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
@@ -242,7 +250,7 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.nfc</name>
- <version>1.0</version>
+ <version>1.0-1</version>
<interface>
<name>INfc</name>
<instance>default</instance>
@@ -266,14 +274,16 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.radio</name>
- <version>1.0-1</version>
+ <version>1.0-2</version>
<interface>
<name>IRadio</name>
- <regex-instance>slot[0-9]+</regex-instance>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ <instance>slot3</instance>
</interface>
<interface>
<name>ISap</name>
- <regex-instance>slot[0-9]+</regex-instance>
+ <instance>slot1</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
@@ -289,7 +299,8 @@
<version>1.0</version>
<interface>
<name>ISecureElement</name>
- <instance>eSE1</instance>
+ <regex-instance>eSE[1-9][0-9]*</regex-instance>
+ <regex-instance>SIM[1-9][0-9]*</regex-instance>
</interface>
</hal>
<hal format="hidl" optional="true">
diff --git a/compatibility_matrices/compatibility_matrix.mk b/compatibility_matrices/compatibility_matrix.mk
index abc6796..6dc2b4f 100644
--- a/compatibility_matrices/compatibility_matrix.mk
+++ b/compatibility_matrices/compatibility_matrix.mk
@@ -25,12 +25,33 @@
# $(warning $(call remove-minor-revision,3.18.0))
-ifndef LOCAL_MODULE_STEM
-$(error LOCAL_MODULE_STEM must be defined.)
-endif
+##### Input Variables:
+# LOCAL_MODULE: required. Module name for the build system.
+# LOCAL_MODULE_CLASS: optional. Default is ETC.
+# LOCAL_MODULE_PATH: optional. Path of output file. Default is $(TARGET_OUT)/etc/vintf.
+# LOCAL_MODULE_STEM: optional. Name of output file. Default is $(LOCAL_MODULE).
+# LOCAL_SRC_FILES: required. Local source files provided to assemble_vintf
+# (command line argument -i).
+# LOCAL_GENERATED_SOURCES: optional. Global source files provided to assemble_vintf
+# (command line argument -i).
+#
+# LOCAL_ADD_VBMETA_VERSION: Use AVBTOOL to add avb version to the output matrix
+# (corresponds to <avb><vbmeta-version> tag)
+# LOCAL_ASSEMBLE_VINTF_ENV_VARS: Add a list of environment variable names from global variables in
+# the build system that is lazily evaluated (e.g. PRODUCT_ENFORCE_VINTF_MANIFEST).
+# LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE: Add a list of environment variables that is local to
+# assemble_vintf invocation. Format is "VINTF_ENFORCE_NO_UNUSED_HALS=true".
+# LOCAL_ASSEMBLE_VINTF_FLAGS: Add additional command line arguments to assemble_vintf invocation.
+# LOCAL_KERNEL_VERSIONS: Parse kernel configurations and add to the output matrix
+# (corresponds to <kernel> tags.)
+# LOCAL_GEN_FILE_DEPENDENCIES: A list of additional dependencies for the generated file.
ifndef LOCAL_MODULE
-LOCAL_MODULE := framework_$(LOCAL_MODULE_STEM)
+$(error LOCAL_MODULE must be defined.)
+endif
+
+ifndef LOCAL_MODULE_STEM
+LOCAL_MODULE_STEM := $(LOCAL_MODULE)
endif
ifndef LOCAL_MODULE_CLASS
@@ -81,13 +102,17 @@
$(addprefix $(LOCAL_PATH)/,$(LOCAL_SRC_FILES)) \
$(LOCAL_GENERATED_SOURCES)
-ifneq (,$(strip $(LOCAL_WARN_REQUIRED_HALS)))
-$(GEN): PRIVATE_ADDITIONAL_ENV_VARS += PRODUCT_ENFORCE_VINTF_MANIFEST=true
-$(GEN): PRIVATE_COMMAND_TAIL := || (echo $(strip $(LOCAL_WARN_REQUIRED_HALS)) && false)
+$(GEN): PRIVATE_ADDITIONAL_ENV_VARS := $(LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE)
+
+ifneq (,$(strip $(LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE)))
+$(GEN): PRIVATE_COMMAND_TAIL := || (echo $(strip $(LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE)) && false)
endif
$(GEN): PRIVATE_SRC_FILES := $(my_matrix_src_files)
$(GEN): $(my_matrix_src_files) $(HOST_OUT_EXECUTABLES)/assemble_vintf
+ $(foreach varname,$(PRIVATE_ENV_VARS),\
+ $(if $(findstring $(varname),$(PRIVATE_ADDITIONAL_ENV_VARS)),\
+ $(error $(varname) should not be overridden by LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE.)))
$(foreach varname,$(PRIVATE_ENV_VARS),$(varname)="$($(varname))") \
$(PRIVATE_ADDITIONAL_ENV_VARS) \
$(HOST_OUT_EXECUTABLES)/assemble_vintf \
@@ -101,8 +126,9 @@
LOCAL_ADD_VBMETA_VERSION :=
LOCAL_ASSEMBLE_VINTF_ENV_VARS :=
+LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE :=
+LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE :=
LOCAL_ASSEMBLE_VINTF_FLAGS :=
-LOCAL_WARN_REQUIRED_HALS :=
LOCAL_KERNEL_VERSIONS :=
LOCAL_GEN_FILE_DEPENDENCIES :=
my_matrix_src_files :=
diff --git a/current.txt b/current.txt
index 7771fe8..dc5f2ee 100644
--- a/current.txt
+++ b/current.txt
@@ -295,7 +295,7 @@
3b17c1fdfc389e0abe626c37054954b07201127d890c2bc05d47613ec1f4de4f android.hardware.automotive.evs@1.0::types
b3caf524c46a47d67e6453a34419e1881942d059e146cda740502670e9a752c3 android.hardware.automotive.vehicle@2.0::IVehicle
80fb4156fa91ce86e49bd2cabe215078f6b69591d416a09e914532eae6712052 android.hardware.automotive.vehicle@2.0::IVehicleCallback
-4ff0dcfb938a5df283eef47de33b4e1284fab73f584cfc0c94e97317bdb7bf26 android.hardware.automotive.vehicle@2.0::types
+a7ac51f419107020b9544efb25e030485e5dc4914c5138c2b8d83a1f52a76825 android.hardware.automotive.vehicle@2.0::types
32cc50cc2a7658ec613c0c2dd2accbf6a05113b749852879e818b8b7b438db19 android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioHost
ff4be64d7992f8bec97dff37f35450e79b3430c61f85f54322ce45bef229dc3b android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioOffload
27f22d2e873e6201f9620cf4d8e2facb25bd0dd30a2b911e441b4600d560fa62 android.hardware.bluetooth.a2dp@1.0::types