Merge "Support effect destroy at any state" into main
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index eedac3d..8ceb56b 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -47,6 +47,7 @@
using aidl::android::hardware::audio::effect::getRange;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::isRangeValid;
+using aidl::android::hardware::audio::effect::kDrainSupportedVersion;
using aidl::android::hardware::audio::effect::kEffectTypeUuidSpatializer;
using aidl::android::hardware::audio::effect::kEventFlagDataMqNotEmpty;
using aidl::android::hardware::audio::effect::kEventFlagDataMqUpdate;
@@ -195,8 +196,11 @@
ASSERT_TRUE(expectState(effect, State::PROCESSING));
break;
case CommandId::STOP:
- ASSERT_TRUE(expectState(effect, State::IDLE) ||
- expectState(effect, State::DRAINING));
+ // Enforce the state checking after kDrainSupportedVersion
+ if (getHalVersion(effect) >= kDrainSupportedVersion) {
+ ASSERT_TRUE(expectState(effect, State::IDLE) ||
+ expectState(effect, State::DRAINING));
+ }
break;
case CommandId::RESET:
ASSERT_TRUE(expectState(effect, State::IDLE));
@@ -518,6 +522,11 @@
}
}
+ static int getHalVersion(const std::shared_ptr<IEffect>& effect) {
+ int version = 0;
+ return (effect && effect->getInterfaceVersion(&version).isOk()) ? version : 0;
+ }
+
bool mIsSpatializer;
Descriptor mDescriptor;
size_t mInputFrameSize, mOutputFrameSize;
diff --git a/biometrics/face/aidl/default/apex/Android.bp b/biometrics/face/aidl/default/apex/Android.bp
index c4632d4..0561145 100644
--- a/biometrics/face/aidl/default/apex/Android.bp
+++ b/biometrics/face/aidl/default/apex/Android.bp
@@ -19,7 +19,7 @@
apex {
name: "com.android.hardware.biometrics.face.virtual",
manifest: "manifest.json",
- file_contexts: "file_contexts",
+ file_contexts: ":com.android.biometrics.virtual.face-file_contexts",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
diff --git a/biometrics/face/aidl/default/apex/file_contexts b/biometrics/face/aidl/default/apex/file_contexts
deleted file mode 100644
index 4f935c1..0000000
--- a/biometrics/face/aidl/default/apex/file_contexts
+++ /dev/null
@@ -1,3 +0,0 @@
-(/.*)? u:object_r:vendor_file:s0
-/etc(/.*)? u:object_r:vendor_configs_file:s0
-/bin/hw/android\.hardware\.biometrics\.face-service\.example u:object_r:hal_face_default_exec:s0
\ No newline at end of file
diff --git a/security/keymint/aidl/default/hal/lib.rs b/security/keymint/aidl/default/hal/lib.rs
index 359890d..fad807f 100644
--- a/security/keymint/aidl/default/hal/lib.rs
+++ b/security/keymint/aidl/default/hal/lib.rs
@@ -20,39 +20,22 @@
use kmr_hal::env::get_property;
use log::error;
-/// Retrieve the most significant attestation property for `name`.
-fn attestation_property(name: &str) -> Vec<u8> {
- let prop_val =
- get_property(&format!("ro.product.{}_for_attestation", name)).unwrap_or_default();
- if !prop_val.is_empty() {
- prop_val
- } else {
- let prop_val = get_property(&format!("ro.product.vendor.{}", name)).unwrap_or_default();
- if !prop_val.is_empty() {
- prop_val
- } else {
- get_property(&format!("ro.product.{}", name))
- .unwrap_or_else(|prop_name| format!("{} unavailable", prop_name))
- }
- }
- .as_bytes()
- .to_vec()
-}
-
/// Populate attestation ID information based on properties (where available).
/// Retrieving the serial number requires SELinux permission.
pub fn attestation_id_info() -> kmr_wire::AttestationIdInfo {
-
- kmr_wire::AttestationIdInfo {
- brand: attestation_property("brand"),
- device: attestation_property("device"),
- product: attestation_property("name"),
- serial: get_property("ro.serialno")
- .unwrap_or_else(|_| format!("ro.serialno unavailable"))
+ let prop = |name| {
+ get_property(name)
+ .unwrap_or_else(|_| format!("{} unavailable", name))
.as_bytes()
- .to_vec(),
- manufacturer: attestation_property("manufacturer"),
- model: attestation_property("model"),
+ .to_vec()
+ };
+ kmr_wire::AttestationIdInfo {
+ brand: prop("ro.product.brand"),
+ device: prop("ro.product.device"),
+ product: prop("ro.product.name"),
+ serial: prop("ro.serialno"),
+ manufacturer: prop("ro.product.manufacturer"),
+ model: prop("ro.product.model"),
// Currently modem_simulator always returns one fixed value. See `handleGetIMEI` in
// device/google/cuttlefish/host/commands/modem_simulator/misc_service.cpp for more details.
// TODO(b/263188546): Use device-specific IMEI values when available.