Merge "Updated INFO_MODEL_YEAR to specify YYYY format and Gregorian calendar." into main
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index bfa2783..e65ee77 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -118,8 +118,6 @@
cc_binary {
name: "android.hardware.audio.service-aidl.example",
relative_install_path: "hw",
- init_rc: ["android.hardware.audio.service-aidl.example.rc"],
- vintf_fragments: ["android.hardware.audio.service-aidl.xml"],
defaults: [
"aidlaudioservice_defaults",
"latest_android_hardware_audio_core_sounddose_ndk_shared",
@@ -146,6 +144,7 @@
"-Wthread-safety",
"-DBACKEND_NDK",
],
+ installable: false, //installed in apex com.android.hardware.audio
}
cc_test {
@@ -239,10 +238,9 @@
cc_binary {
name: "android.hardware.audio.effect.service-aidl.example",
relative_install_path: "hw",
- init_rc: ["android.hardware.audio.effect.service-aidl.example.rc"],
- vintf_fragments: ["android.hardware.audio.effect.service-aidl.xml"],
defaults: ["aidlaudioeffectservice_defaults"],
shared_libs: [
+ "libapexsupport",
"libtinyxml2",
],
srcs: [
@@ -250,6 +248,7 @@
"EffectFactory.cpp",
"EffectMain.cpp",
],
+ installable: false, //installed in apex com.android.hardware.audio.effect
}
cc_library_headers {
@@ -258,3 +257,22 @@
vendor_available: true,
host_supported: true,
}
+
+prebuilt_etc {
+ name: "android.hardware.audio.service-aidl.example.rc",
+ src: "android.hardware.audio.service-aidl.example.rc",
+ installable: false,
+}
+
+prebuilt_etc {
+ name: "android.hardware.audio.service-aidl.xml",
+ src: "android.hardware.audio.service-aidl.xml",
+ sub_dir: "vintf",
+ installable: false,
+}
+
+prebuilt_etc {
+ name: "audio_effects_config.xml",
+ src: "audio_effects_config.xml",
+ installable: false,
+}
diff --git a/audio/aidl/default/EffectConfig.cpp b/audio/aidl/default/EffectConfig.cpp
index 4a12f8a..1cc4897 100644
--- a/audio/aidl/default/EffectConfig.cpp
+++ b/audio/aidl/default/EffectConfig.cpp
@@ -24,6 +24,10 @@
#include "effectFactory-impl/EffectConfig.h"
+#ifdef __ANDROID_APEX__
+#include <android/apexsupport.h>
+#endif
+
using aidl::android::media::audio::common::AudioSource;
using aidl::android::media::audio::common::AudioStreamType;
using aidl::android::media::audio::common::AudioUuid;
@@ -89,6 +93,24 @@
}
bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) {
+ if (__builtin_available(android AAPEXSUPPORT_API, *)) {
+ AApexInfo *apexInfo;
+ if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) {
+ std::string apexName(AApexInfo_getName(apexInfo));
+ AApexInfo_destroy(apexInfo);
+ std::string candidatePath("/apex/");
+ candidatePath.append(apexName).append(kEffectLibApexPath).append(path);
+ LOG(DEBUG) << __func__ << " effect lib path " << candidatePath;
+ if (access(candidatePath.c_str(), R_OK) == 0) {
+ *resolvedPath = std::move(candidatePath);
+ return true;
+ }
+ }
+ } else {
+ LOG(DEBUG) << __func__ << " libapexsupport is not supported";
+ }
+
+ // If audio effects libs are not in vendor apex, locate them in kEffectLibPath
for (auto* libraryDirectory : kEffectLibPath) {
std::string candidatePath = std::string(libraryDirectory) + '/' + path;
if (access(candidatePath.c_str(), R_OK) == 0) {
diff --git a/audio/aidl/default/EffectMain.cpp b/audio/aidl/default/EffectMain.cpp
index ca81204..ac178b6 100644
--- a/audio/aidl/default/EffectMain.cpp
+++ b/audio/aidl/default/EffectMain.cpp
@@ -21,15 +21,39 @@
#include <android/binder_process.h>
#include <system/audio_config.h>
+#ifdef __ANDROID_APEX__
+#include <android/apexsupport.h>
+#endif
+
/** Default name of effect configuration file. */
static const char* kDefaultConfigName = "audio_effects_config.xml";
+static inline std::string config_file_path() {
+ if (__builtin_available(android AAPEXSUPPORT_API, *)) {
+ AApexInfo *apexInfo;
+ if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) {
+ std::string apexName(AApexInfo_getName(apexInfo));
+ AApexInfo_destroy(apexInfo);
+ std::string candidatePath("/apex/");
+ candidatePath.append(apexName).append("/etc/").append(kDefaultConfigName);
+ LOG(DEBUG) << __func__ << " effect lib path " << candidatePath;
+ if (access(candidatePath.c_str(), R_OK) == 0) {
+ return std::move(candidatePath);
+ }
+ }
+ } else {
+ LOG(DEBUG) << __func__ << " libapexsupport is not supported";
+ }
+ LOG(DEBUG) << __func__ << ": Unable to resolve config file path in APEX";
+ return android::audio_find_readable_configuration_file(kDefaultConfigName);
+}
+
int main() {
// This is a debug implementation, always enable debug logging.
android::base::SetMinimumLogSeverity(::android::base::DEBUG);
ABinderProcess_setThreadPoolMaxThreadCount(0);
- auto configFile = android::audio_find_readable_configuration_file(kDefaultConfigName);
+ auto configFile = config_file_path();
if (configFile == "") {
LOG(ERROR) << __func__ << ": config file " << kDefaultConfigName << " not found!";
return EXIT_FAILURE;
diff --git a/audio/aidl/default/acousticEchoCanceler/Android.bp b/audio/aidl/default/acousticEchoCanceler/Android.bp
index 35d4a56..d0404cd 100644
--- a/audio/aidl/default/acousticEchoCanceler/Android.bp
+++ b/audio/aidl/default/acousticEchoCanceler/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/android.hardware.audio.effect.service-aidl.example.rc b/audio/aidl/default/android.hardware.audio.effect.service-aidl.example.rc
deleted file mode 100644
index 5f859a1..0000000
--- a/audio/aidl/default/android.hardware.audio.effect.service-aidl.example.rc
+++ /dev/null
@@ -1,11 +0,0 @@
-service vendor.audio-effect-hal-aidl /vendor/bin/hw/android.hardware.audio.effect.service-aidl.example
- class hal
- user audioserver
- # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
- group audio media
- capabilities BLOCK_SUSPEND
- # setting RLIMIT_RTPRIO allows binder RT priority inheritance
- rlimit rtprio 10 10
- ioprio rt 4
- task_profiles ProcessCapacityHigh HighPerformance
- onrestart restart audioserver
diff --git a/audio/aidl/default/android.hardware.audio.effect.service-aidl.xml b/audio/aidl/default/android.hardware.audio.effect.service-aidl.xml
deleted file mode 100644
index 05a825d..0000000
--- a/audio/aidl/default/android.hardware.audio.effect.service-aidl.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<manifest version="1.0" type="device">
- <hal format="aidl">
- <name>android.hardware.audio.effect</name>
- <version>2</version>
- <fqname>IFactory/default</fqname>
- </hal>
-</manifest>
diff --git a/audio/aidl/default/android.hardware.audio.service-aidl.example.rc b/audio/aidl/default/android.hardware.audio.service-aidl.example.rc
index 757976f..c3e19ba 100644
--- a/audio/aidl/default/android.hardware.audio.service-aidl.example.rc
+++ b/audio/aidl/default/android.hardware.audio.service-aidl.example.rc
@@ -1,4 +1,5 @@
-service vendor.audio-hal-aidl /vendor/bin/hw/android.hardware.audio.service-aidl.example
+
+service vendor.audio-hal-aidl /apex/com.android.hardware.audio/bin/hw/android.hardware.audio.service-aidl.example
class hal
user audioserver
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
@@ -9,3 +10,15 @@
ioprio rt 4
task_profiles ProcessCapacityHigh HighPerformance
onrestart restart audioserver
+
+service vendor.audio-effect-hal-aidl /apex/com.android.hardware.audio/bin/hw/android.hardware.audio.effect.service-aidl.example
+ class hal
+ user audioserver
+ # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
+ group audio media
+ capabilities BLOCK_SUSPEND
+ # setting RLIMIT_RTPRIO allows binder RT priority inheritance
+ rlimit rtprio 10 10
+ ioprio rt 4
+ task_profiles ProcessCapacityHigh HighPerformance
+ onrestart restart audioserver
\ No newline at end of file
diff --git a/audio/aidl/default/android.hardware.audio.service-aidl.xml b/audio/aidl/default/android.hardware.audio.service-aidl.xml
index 2a51876..5278e4f 100644
--- a/audio/aidl/default/android.hardware.audio.service-aidl.xml
+++ b/audio/aidl/default/android.hardware.audio.service-aidl.xml
@@ -31,4 +31,9 @@
<fqname>IModule/usb</fqname>
</hal>
-->
+ <hal format="aidl">
+ <name>android.hardware.audio.effect</name>
+ <version>2</version>
+ <fqname>IFactory/default</fqname>
+ </hal>
</manifest>
diff --git a/audio/aidl/default/apex/com.android.hardware.audio/Android.bp b/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
new file mode 100644
index 0000000..da84412
--- /dev/null
+++ b/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
@@ -0,0 +1,49 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+apex {
+ name: "com.android.hardware.audio",
+ manifest: "manifest.json",
+ file_contexts: "file_contexts",
+ key: "com.android.hardware.key",
+ certificate: ":com.android.hardware.certificate",
+ updatable: false,
+ vendor: true,
+
+ binaries: [
+ "android.hardware.audio.service-aidl.example",
+ "android.hardware.audio.effect.service-aidl.example",
+ ],
+ native_shared_libs: [
+ "libaecsw",
+ "libagc1sw",
+ "libagc2sw",
+ "libbassboostsw",
+ "libbundleaidl",
+ "libdownmixaidl",
+ "libdynamicsprocessingaidl",
+ "libenvreverbsw",
+ "libequalizersw",
+ "libextensioneffect",
+ "libhapticgeneratoraidl",
+ "libloudnessenhanceraidl",
+ "libnssw",
+ "libpreprocessingaidl",
+ "libpresetreverbsw",
+ "libreverbaidl",
+ "libvirtualizersw",
+ "libvisualizeraidl",
+ "libvolumesw",
+ ],
+ prebuilts: [
+ "android.hardware.audio.service-aidl.example.rc",
+ "android.hardware.audio.service-aidl.xml",
+ "audio_effects_config.xml",
+ ],
+}
diff --git a/audio/aidl/default/apex/com.android.hardware.audio/file_contexts b/audio/aidl/default/apex/com.android.hardware.audio/file_contexts
new file mode 100644
index 0000000..41a6ada
--- /dev/null
+++ b/audio/aidl/default/apex/com.android.hardware.audio/file_contexts
@@ -0,0 +1,4 @@
+(/.*)? u:object_r:vendor_file:s0
+/etc(/.*)? u:object_r:vendor_configs_file:s0
+/bin/hw/android\.hardware\.audio\.service-aidl\.example u:object_r:hal_audio_default_exec:s0
+/bin/hw/android\.hardware\.audio\.effect\.service-aidl\.example u:object_r:hal_audio_default_exec:s0
\ No newline at end of file
diff --git a/audio/aidl/default/apex/com.android.hardware.audio/manifest.json b/audio/aidl/default/apex/com.android.hardware.audio/manifest.json
new file mode 100644
index 0000000..42a2368
--- /dev/null
+++ b/audio/aidl/default/apex/com.android.hardware.audio/manifest.json
@@ -0,0 +1,4 @@
+{
+ "name": "com.android.hardware.audio",
+ "version": 1
+}
diff --git a/audio/aidl/default/automaticGainControlV1/Android.bp b/audio/aidl/default/automaticGainControlV1/Android.bp
index 05c2c54..7b753eb 100644
--- a/audio/aidl/default/automaticGainControlV1/Android.bp
+++ b/audio/aidl/default/automaticGainControlV1/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/automaticGainControlV2/Android.bp b/audio/aidl/default/automaticGainControlV2/Android.bp
index dedc555..ea05152 100644
--- a/audio/aidl/default/automaticGainControlV2/Android.bp
+++ b/audio/aidl/default/automaticGainControlV2/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/bassboost/Android.bp b/audio/aidl/default/bassboost/Android.bp
index 9f47770..8f53eae 100644
--- a/audio/aidl/default/bassboost/Android.bp
+++ b/audio/aidl/default/bassboost/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/envReverb/Android.bp b/audio/aidl/default/envReverb/Android.bp
index 2443c2a..23495f1 100644
--- a/audio/aidl/default/envReverb/Android.bp
+++ b/audio/aidl/default/envReverb/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/equalizer/Android.bp b/audio/aidl/default/equalizer/Android.bp
index 42708d1..1d29d40 100644
--- a/audio/aidl/default/equalizer/Android.bp
+++ b/audio/aidl/default/equalizer/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/extension/Android.bp b/audio/aidl/default/extension/Android.bp
index 5fee479..2b21e3e 100644
--- a/audio/aidl/default/extension/Android.bp
+++ b/audio/aidl/default/extension/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/include/effectFactory-impl/EffectConfig.h b/audio/aidl/default/include/effectFactory-impl/EffectConfig.h
index 344846a..7456b99 100644
--- a/audio/aidl/default/include/effectFactory-impl/EffectConfig.h
+++ b/audio/aidl/default/include/effectFactory-impl/EffectConfig.h
@@ -64,12 +64,16 @@
const ProcessingLibrariesMap& getProcessingMap() const;
private:
- static constexpr const char* kEffectLibPath[] =
#ifdef __LP64__
- {"/odm/lib64/soundfx", "/vendor/lib64/soundfx", "/system/lib64/soundfx"};
+#define SOUND_FX_PATH "/lib64/soundfx/"
#else
- {"/odm/lib/soundfx", "/vendor/lib/soundfx", "/system/lib/soundfx"};
+#define SOUND_FX_PATH "/lib/soundfx/"
#endif
+ static constexpr const char* kEffectLibPath[] =
+ { "/odm" SOUND_FX_PATH, "/vendor" SOUND_FX_PATH, "/system" SOUND_FX_PATH };
+
+ static constexpr const char* kEffectLibApexPath = SOUND_FX_PATH;
+#undef SOUND_FX_PATH
int mSkippedElements;
/* Parsed Libraries result */
diff --git a/audio/aidl/default/noiseSuppression/Android.bp b/audio/aidl/default/noiseSuppression/Android.bp
index f24ded6..5729571 100644
--- a/audio/aidl/default/noiseSuppression/Android.bp
+++ b/audio/aidl/default/noiseSuppression/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/presetReverb/Android.bp b/audio/aidl/default/presetReverb/Android.bp
index d600141..2a2ae75 100644
--- a/audio/aidl/default/presetReverb/Android.bp
+++ b/audio/aidl/default/presetReverb/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/virtualizer/Android.bp b/audio/aidl/default/virtualizer/Android.bp
index 1c41bb5..5d59f7c 100644
--- a/audio/aidl/default/virtualizer/Android.bp
+++ b/audio/aidl/default/virtualizer/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/default/volume/Android.bp b/audio/aidl/default/volume/Android.bp
index f1a051f..8d5401a 100644
--- a/audio/aidl/default/volume/Android.bp
+++ b/audio/aidl/default/volume/Android.bp
@@ -34,6 +34,6 @@
],
relative_install_path: "soundfx",
visibility: [
- "//hardware/interfaces/audio/aidl/default",
+ "//hardware/interfaces/audio/aidl/default:__subpackages__",
],
}
diff --git a/audio/aidl/vts/EffectFactoryHelper.h b/audio/aidl/vts/EffectFactoryHelper.h
index ca36655..7100431 100644
--- a/audio/aidl/vts/EffectFactoryHelper.h
+++ b/audio/aidl/vts/EffectFactoryHelper.h
@@ -24,6 +24,7 @@
#include <aidl/Vintf.h>
#include <android/binder_auto_utils.h>
+#include "AudioHalBinderServiceUtil.h"
#include "TestUtils.h"
using namespace android;
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index 9fa7f9f..0be4e50 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -35,7 +35,6 @@
#include <system/audio_effects/aidl_effects_utils.h>
#include <system/audio_effects/effect_uuid.h>
-#include "AudioHalBinderServiceUtil.h"
#include "EffectFactoryHelper.h"
#include "TestUtils.h"
diff --git a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
index 523f20d..adf1da7 100644
--- a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
@@ -32,7 +32,6 @@
#include <aidl/android/hardware/audio/effect/IFactory.h>
-#include "AudioHalBinderServiceUtil.h"
#include "EffectFactoryHelper.h"
#include "TestUtils.h"
diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
index 01cdd81..1e6a49f 100644
--- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
@@ -29,7 +29,6 @@
#include <android/binder_process.h>
#include <fmq/AidlMessageQueue.h>
-#include "AudioHalBinderServiceUtil.h"
#include "EffectFactoryHelper.h"
#include "EffectHelper.h"
#include "TestUtils.h"
diff --git a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
index 76838cef..d7dbe38 100644
--- a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
@@ -29,7 +29,6 @@
#include <android/binder_process.h>
#include <gtest/gtest.h>
-#include "AudioHalBinderServiceUtil.h"
#include "EffectHelper.h"
#include "TestUtils.h"
diff --git a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp
index 03f256e..ff7f41c 100644
--- a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp
+++ b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp
@@ -2010,6 +2010,13 @@
// Test each reported camera
for (auto&& cam: cameraInfo) {
+ bool isLogicalCam = false;
+ getPhysicalCameraIds(cam.v1.cameraId, isLogicalCam);
+ if (isLogicalCam) {
+ LOG(INFO) << "Skip a logical device " << cam.v1.cameraId;
+ continue;
+ }
+
// Request exclusive access to the EVS display
sp<IEvsDisplay_1_0> pDisplay = pEnumerator->openDisplay();
ASSERT_NE(pDisplay, nullptr);
diff --git a/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
index 42b8008..e3f7b5e 100644
--- a/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
@@ -246,13 +246,6 @@
*(pixels++) = *(v_head++);
}
- const auto status =
- AMediaCodec_releaseOutputBuffer(mVideoCodec.get(), index, /* render = */ false);
- if (status != AMEDIA_OK) {
- LOG(ERROR) << __func__
- << ": Received error in releasing output buffer. Error code: " << status;
- }
-
// Release our output buffer
mapper.unlock(renderBufferHandle);
@@ -305,6 +298,12 @@
return;
}
onCodecOutputAvailable(codecOutputputBufferIdx, info);
+ const auto release_status = AMediaCodec_releaseOutputBuffer(
+ mVideoCodec.get(), codecOutputputBufferIdx, /* render = */ false);
+ if (release_status != AMEDIA_OK) {
+ LOG(ERROR) << __func__
+ << ": Received error in releasing output buffer. Error code: " << release_status;
+ }
}
void EvsVideoEmulatedCamera::initializeParameters() {
diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index 56d8b4b..590eff9 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -3456,6 +3456,839 @@
}
},
{
+ "property": "VehicleProperty::ULTRASONICS_SENSOR_POSITION",
+ "comment":
+ "Default values for 12 individual ultrasonic sensors installed on the vehicle. Six sensors on the front bumper. Six sensors on the back bumper.",
+ "areas": [
+ {
+ "defaultValue": {
+ "int32Values": [
+ -1000,
+ 3900,
+ 0
+ ]
+ },
+ "areaId": 1,
+ "comment": "Rough numbers representing front left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ -600,
+ 4000,
+ 0
+ ]
+ },
+ "areaId": 2,
+ "comment": "Rough numbers representing front 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ -200,
+ 4000,
+ 0
+ ]
+ },
+ "areaId": 4,
+ "comment": "Rough numbers representing front 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 200,
+ 4000,
+ 0
+ ]
+ },
+ "areaId": 8,
+ "comment": "Rough numbers representing front 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 600,
+ 4000,
+ 0
+ ]
+ },
+ "areaId": 16,
+ "comment": "Rough numbers representing front 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 1000,
+ 3900,
+ 0
+ ]
+ },
+ "areaId": 32,
+ "comment": "Rough numbers representing front right most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ -1000,
+ -900,
+ 0
+ ]
+ },
+ "areaId": 64,
+ "comment": "Rough numbers representing back left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ -600,
+ -1000,
+ 0
+ ]
+ },
+ "areaId": 128,
+ "comment": "Rough numbers representing back 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ -200,
+ -1000,
+ 0
+ ]
+ },
+ "areaId": 256,
+ "comment": "Rough numbers representing back 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 200,
+ -1000,
+ 0
+ ]
+ },
+ "areaId": 512,
+ "comment": "Rough numbers representing back 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 600,
+ -1000,
+ 0
+ ]
+ },
+ "areaId": 1024,
+ "comment": "Rough numbers representing back 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 1000,
+ -900,
+ 0
+ ]
+ },
+ "areaId": 2048,
+ "comment": "Rough numbers representing back right most sensor."
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::ULTRASONICS_SENSOR_ORIENTATION",
+ "comment":
+ "Default values for 12 individual ultrasonic sensors installed on the vehicle. Six sensors on the front bumper. Six sensors on the back bumper.",
+ "areas": [
+ {
+ "defaultValue": {
+ "floatValues": [
+ 0.924,
+ 0,
+ 0,
+ 0.383
+ ]
+ },
+ "areaId": 1,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing front left most sensor rotated 45 degrees counter-clockwise."
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 1,
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "areaId": 2,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing front 2nd to the left sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 1,
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "areaId": 4,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing front 3rd to the left sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 1,
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "areaId": 8,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing front 3rd to the right sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 1,
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "areaId": 16,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing front 2nd to the right sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 0.924,
+ 0,
+ 0,
+ -0.383
+ ]
+ },
+ "areaId": 32,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing front right most sensor rotated 45 degrees clockwise."
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 60,
+ 61,
+ 62,
+ 63
+ ]
+ },
+ "areaId": 64,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing back left most sensor rotated 45 degrees counter-clockwise."
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 70,
+ 71,
+ 72,
+ 73
+ ]
+ },
+ "areaId": 128,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing back 2nd to the left sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 81,
+ 82,
+ 83,
+ 84
+ ]
+ },
+ "areaId": 256,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing back 3rd to the right sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 90,
+ 91,
+ 92,
+ 93
+ ]
+ },
+ "areaId": 512,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing back 3rd to the right sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 100,
+ 101,
+ 102,
+ 103
+ ]
+ },
+ "areaId": 1024,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing back 2nd to the right sensor rotated 0 degrees"
+ },
+ {
+ "defaultValue": {
+ "floatValues": [
+ 110,
+ 111,
+ 112,
+ 113
+ ]
+ },
+ "areaId": 2048,
+ "comment":
+ "Rough quaternion values [w, x, y, z] representing back right most sensor rotated 45 degrees clockwise."
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::ULTRASONICS_SENSOR_FIELD_OF_VIEW",
+ "comment":
+ "Default values for 12 individual ultrasonic sensors installed on the vehicle. Six sensors on the front bumper. Six sensors on the back bumper.",
+ "areas": [
+ {
+ "defaultValue": {
+ "int32Values": [
+ 85,
+ 45
+ ]
+ },
+ "areaId": 1,
+ "comment": "Rough values representing front left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 2,
+ "comment": "Rough values representing front 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 4,
+ "comment": "Rough values representing front 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 8,
+ "comment": "Rough values representing front 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 16,
+ "comment": "Rough values representing front 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 85,
+ 45
+ ]
+ },
+ "areaId": 32,
+ "comment": "Rough values representing front right most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 85,
+ 45
+ ]
+ },
+ "areaId": 64,
+ "comment": "Rough values representing back left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 128,
+ "comment": "Rough values representing back 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 256,
+ "comment": "Rough values representing back 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 512,
+ "comment": "Rough values representing back 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 75,
+ 45
+ ]
+ },
+ "areaId": 1024,
+ "comment": "Rough values representing back 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 85,
+ 45
+ ]
+ },
+ "areaId": 2048,
+ "comment": "Rough values representing back right most sensor."
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::ULTRASONICS_SENSOR_DETECTION_RANGE",
+ "areas": [
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 4000
+ ]
+ },
+ "areaId": 1,
+ "comment": "Rough values representing front left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 2,
+ "comment": "Rough values representing front 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 4,
+ "comment": "Rough values representing front 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 8,
+ "comment": "Rough values representing front 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 16,
+ "comment": "Rough values representing front 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 4000
+ ]
+ },
+ "areaId": 32,
+ "comment": "Rough values representing front right most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 4000
+ ]
+ },
+ "areaId": 64,
+ "comment": "Rough values representing back left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 128,
+ "comment": "Rough values representing back 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 256,
+ "comment": "Rough values representing back 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 512,
+ "comment": "Rough values representing back 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 3000
+ ]
+ },
+ "areaId": 1024,
+ "comment": "Rough values representing back 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 4000
+ ]
+ },
+ "areaId": 2048,
+ "comment": "Rough values representing back right most sensor."
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::ULTRASONICS_SENSOR_SUPPORTED_RANGES",
+ "areas": [
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 4000
+ ]
+ },
+ "areaId": 1,
+ "comment": "Rough values representing front left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 3000
+ ]
+ },
+ "areaId": 2,
+ "comment": "Rough values representing front 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 3000
+ ]
+ },
+ "areaId": 4,
+ "comment": "Rough values representing front 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 3000
+ ]
+ },
+ "areaId": 8,
+ "comment": "Rough values representing front 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 3000
+ ]
+ },
+ "areaId": 16,
+ "comment": "Rough values representing front 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 4000
+ ]
+ },
+ "areaId": 32,
+ "comment": "Rough values representing front right most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 4000
+ ]
+ },
+ "areaId": 64,
+ "comment": "Rough values representing back left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 3000
+ ]
+ },
+ "areaId": 128,
+ "comment": "Rough values representing back 2nd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 3000
+ ]
+ },
+ "areaId": 256,
+ "comment": "Rough values representing back 3rd to the left sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 3000
+ ]
+ },
+ "areaId": 512,
+ "comment": "Rough values representing back 3rd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 3000
+ ]
+ },
+ "areaId": 1024,
+ "comment": "Rough values representing back 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 150,
+ 999,
+ 1000,
+ 1999,
+ 2000,
+ 4000
+ ]
+ },
+ "areaId": 2048,
+ "comment": "Rough values representing back right most sensor."
+ }
+ ]
+ },
+ {
+ "property": "VehicleProperty::ULTRASONICS_SENSOR_MEASURED_DISTANCE",
+ "areas": [
+ {
+ "defaultValue": {
+ "int32Values": [
+ 2000,
+ 10
+ ]
+ },
+ "areaId": 1,
+ "comment": "Rough values representing front left most sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 2,
+ "comment":
+ "Rough values representing front 2nd to the left sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 4,
+ "comment":
+ "Rough values representing front 3rd to the left sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 8,
+ "comment":
+ "Rough values representing front 3rd to the right sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 16,
+ "comment":
+ "Rough values representing front 2nd to the right sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 32,
+ "comment":
+ "Rough values representing front right most sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 64,
+ "comment": "Rough values representing back left most sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 128,
+ "comment":
+ "Rough values representing back 2nd to the left sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": []
+ },
+ "areaId": 256,
+ "comment":
+ "Rough values representing back 3rd to the left sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 1000
+ ]
+ },
+ "areaId": 512,
+ "comment":
+ "Rough values representing back 3rd to the right sensor. Nothing detected."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 2000,
+ 50
+ ]
+ },
+ "areaId": 1024,
+ "comment": "Rough values representing back 2nd to the right sensor."
+ },
+ {
+ "defaultValue": {
+ "int32Values": [
+ 2000
+ ]
+ },
+ "areaId": 2048,
+ "comment":
+ "Rough values representing back right most sensor. No distance error."
+ }
+ ],
+ "maxSampleRate": 10.0,
+ "minSampleRate": 1.0
+ },
+ {
"property": "VehicleProperty::ELECTRONIC_TOLL_COLLECTION_CARD_TYPE",
"defaultValue": {
"int32Values": [
diff --git a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
index 9834cdb..b0c6ae7 100644
--- a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
+++ b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.automotive.vehicle</name>
- <version>2</version>
+ <version>3</version>
<fqname>IVehicle/default</fqname>
</hal>
</manifest>
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 52876d1..2e25466 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
@@ -199,7 +199,7 @@
VEHICLE_MAP_SERVICE = (((0x0C00 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299895808 */,
LOCATION_CHARACTERIZATION = (((0x0C10 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410064 */,
ULTRASONICS_SENSOR_POSITION = (((0x0C20 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916128 */,
- ULTRASONICS_SENSOR_ORIENTATION = (((0x0C21 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916129 */,
+ ULTRASONICS_SENSOR_ORIENTATION = (((0x0C21 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT_VEC) /* 409013281 */,
ULTRASONICS_SENSOR_FIELD_OF_VIEW = (((0x0C22 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916130 */,
ULTRASONICS_SENSOR_DETECTION_RANGE = (((0x0C23 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916131 */,
ULTRASONICS_SENSOR_SUPPORTED_RANGES = (((0x0C24 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.VENDOR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32_VEC) /* 406916132 */,
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 d375a56..97e7847 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -3561,7 +3561,7 @@
* @version 3
*/
ULTRASONICS_SENSOR_ORIENTATION = 0x0C21 + VehiclePropertyGroup.SYSTEM + VehicleArea.VENDOR
- + VehiclePropertyType.INT32_VEC,
+ + VehiclePropertyType.FLOAT_VEC,
/**
* Static data for the field of view of each ultrasonic sensor in degrees.
diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
index f8ddfaa..960c5ac 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -48,9 +48,11 @@
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyAccess;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyChangeMode;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyGroup;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyStatus;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyType;
using ::aidl::android::hardware::automotive::vehicle::VersionForVehicleProperty;
using ::android::getAidlHalInstanceNames;
+using ::android::uptimeMillis;
using ::android::base::ScopedLockAssertion;
using ::android::base::StringPrintf;
using ::android::frameworks::automotive::vhal::ErrorCode;
@@ -59,6 +61,7 @@
using ::android::frameworks::automotive::vhal::IHalPropValue;
using ::android::frameworks::automotive::vhal::ISubscriptionCallback;
using ::android::frameworks::automotive::vhal::IVhalClient;
+using ::android::frameworks::automotive::vhal::VhalClientResult;
using ::android::hardware::getAllHalInstanceNames;
using ::android::hardware::Sanitize;
using ::android::hardware::automotive::vehicle::isSystemProp;
@@ -67,6 +70,8 @@
using ::testing::Ge;
constexpr int32_t kInvalidProp = 0x31600207;
+// The timeout for retrying getting prop value after setting prop value.
+constexpr int64_t kRetryGetPropAfterSetPropTimeoutMillis = 10'000;
struct ServiceDescriptor {
std::string name;
@@ -124,6 +129,10 @@
protected:
bool checkIsSupported(int32_t propertyId);
+ static bool isUnavailable(const VhalClientResult<std::unique_ptr<IHalPropValue>>& result);
+ static bool isResultOkayWithValue(
+ const VhalClientResult<std::unique_ptr<IHalPropValue>>& result, int32_t value);
+
public:
void verifyProperty(VehicleProperty propId, VehiclePropertyAccess access,
VehiclePropertyChangeMode changeMode, VehiclePropertyGroup group,
@@ -269,6 +278,30 @@
"Expect failure to get property for invalid prop: %" PRId32, kInvalidProp);
}
+bool VtsHalAutomotiveVehicleTargetTest::isResultOkayWithValue(
+ const VhalClientResult<std::unique_ptr<IHalPropValue>>& result, int32_t value) {
+ return result.ok() && result.value() != nullptr &&
+ result.value()->getStatus() == VehiclePropertyStatus::AVAILABLE &&
+ result.value()->getInt32Values().size() == 1 &&
+ result.value()->getInt32Values()[0] == value;
+}
+
+bool VtsHalAutomotiveVehicleTargetTest::isUnavailable(
+ const VhalClientResult<std::unique_ptr<IHalPropValue>>& result) {
+ if (result.ok()) {
+ return false;
+ }
+ if (result.error().code() == ErrorCode::NOT_AVAILABLE_FROM_VHAL) {
+ return true;
+ }
+ if (result.value() != nullptr &&
+ result.value()->getStatus() == VehiclePropertyStatus::UNAVAILABLE) {
+ return true;
+ }
+
+ return false;
+}
+
// Test set() on read_write properties.
TEST_P(VtsHalAutomotiveVehicleTargetTest, setProp) {
ALOGD("VtsHalAutomotiveVehicleTargetTest::setProp");
@@ -296,6 +329,14 @@
auto propToGet = mVhalClient->createHalPropValue(propId);
auto getValueResult = mVhalClient->getValueSync(*propToGet);
+ if (isUnavailable(getValueResult)) {
+ ALOGW("getProperty for %" PRId32
+ " returns NOT_AVAILABLE, "
+ "skip testing setProp",
+ propId);
+ return;
+ }
+
ASSERT_TRUE(getValueResult.ok())
<< StringPrintf("Failed to get value for property: %" PRId32 ", error: %s",
propId, getValueResult.error().message().c_str());
@@ -308,17 +349,48 @@
"Expect exactly 1 int value for boolean property: %" PRId32 ", got %zu", propId,
intValueSize);
- int setValue = value.getInt32Values()[0] == 1 ? 0 : 1;
+ int32_t setValue = value.getInt32Values()[0] == 1 ? 0 : 1;
auto propToSet = mVhalClient->createHalPropValue(propId);
propToSet->setInt32Values({setValue});
auto setValueResult = mVhalClient->setValueSync(*propToSet);
+ if (!setValueResult.ok() &&
+ setValueResult.error().code() == ErrorCode::NOT_AVAILABLE_FROM_VHAL) {
+ ALOGW("setProperty for %" PRId32
+ " returns NOT_AVAILABLE, "
+ "skip verifying getProperty returns the same value",
+ propId);
+ return;
+ }
+
ASSERT_TRUE(setValueResult.ok())
<< StringPrintf("Failed to set value for property: %" PRId32 ", error: %s",
propId, setValueResult.error().message().c_str());
+ // Retry getting the value until we pass the timeout. getValue might not return
+ // the expected value immediately since setValue is async.
+ auto timeoutMillis = uptimeMillis() + kRetryGetPropAfterSetPropTimeoutMillis;
- // check set success
- getValueResult = mVhalClient->getValueSync(*propToGet);
+ while (true) {
+ getValueResult = mVhalClient->getValueSync(*propToGet);
+ if (isResultOkayWithValue(getValueResult, setValue)) {
+ break;
+ }
+ if (uptimeMillis() >= timeoutMillis) {
+ // Reach timeout, the following assert should fail.
+ break;
+ }
+ // Sleep for 100ms between each getValueSync retry.
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ }
+
+ if (isUnavailable(getValueResult)) {
+ ALOGW("getProperty for %" PRId32
+ " returns NOT_AVAILABLE, "
+ "skip verifying the return value",
+ propId);
+ return;
+ }
+
ASSERT_TRUE(getValueResult.ok())
<< StringPrintf("Failed to get value for property: %" PRId32 ", error: %s",
propId, getValueResult.error().message().c_str());
@@ -598,7 +670,7 @@
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyUltrasonicsSensorOrientationConfig) {
verifyProperty(VehicleProperty::ULTRASONICS_SENSOR_ORIENTATION, VehiclePropertyAccess::READ,
VehiclePropertyChangeMode::STATIC, VehiclePropertyGroup::SYSTEM,
- VehicleArea::VENDOR, VehiclePropertyType::INT32_VEC);
+ VehicleArea::VENDOR, VehiclePropertyType::FLOAT_VEC);
}
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyUltrasonicsSensorFieldOfViewConfig) {
diff --git a/biometrics/face/aidl/default/Face.cpp b/biometrics/face/aidl/default/Face.cpp
index 652a7e1..5ae0df6 100644
--- a/biometrics/face/aidl/default/Face.cpp
+++ b/biometrics/face/aidl/default/Face.cpp
@@ -14,11 +14,23 @@
* limitations under the License.
*/
+#undef LOG_TAG
+#define LOG_TAG "FaceVirtualHal"
+
#include "Face.h"
#include "Session.h"
#include "FakeFaceEngine.h"
+#include <android-base/properties.h>
+#include <face.sysprop.h>
+
+#include <android-base/file.h>
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
+
+using namespace ::android::face::virt;
+
namespace aidl::android::hardware::biometrics::face {
const int kSensorId = 4;
@@ -68,11 +80,105 @@
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus Face::createSession(int32_t /*sensorId*/, int32_t /*userId*/,
+ndk::ScopedAStatus Face::createSession(int32_t sensorId, int32_t userId,
const std::shared_ptr<ISessionCallback>& cb,
std::shared_ptr<ISession>* return_val) {
- *return_val = SharedRefBase::make<Session>(std::make_unique<FakeFaceEngine>(), cb);
+ mSession = SharedRefBase::make<Session>(std::make_unique<FakeFaceEngine>(), cb);
+ *return_val = mSession;
+
+ mSession->linkToDeath(cb->asBinder().get());
+
+ LOG(INFO) << __func__ << ": sensorId:" << sensorId << " userId:" << userId;
return ndk::ScopedAStatus::ok();
}
+binder_status_t Face::dump(int fd, const char** /*args*/, uint32_t numArgs) {
+ if (fd < 0) {
+ LOG(ERROR) << __func__ << "fd invalid: " << fd;
+ return STATUS_BAD_VALUE;
+ } else {
+ LOG(INFO) << __func__ << " fd:" << fd << "numArgs:" << numArgs;
+ }
+
+ dprintf(fd, "----- FaceVirtualHal::dump -----\n");
+ std::vector<SensorProps> sps(1);
+ getSensorProps(&sps);
+ for (auto& sp : sps) {
+ ::android::base::WriteStringToFd(sp.toString(), fd);
+ }
+ if (mSession != nullptr) {
+ ::android::base::WriteStringToFd(mSession->toString(), fd);
+ } else {
+ dprintf(fd, "\nWARNING: no ISession found\n");
+ }
+
+ fsync(fd);
+ return STATUS_OK;
+}
+
+binder_status_t Face::handleShellCommand(int in, int out, int err, const char** args,
+ uint32_t numArgs) {
+ LOG(INFO) << __func__ << " in:" << in << " out:" << out << " err:" << err
+ << " numArgs:" << numArgs;
+
+ if (numArgs == 0) {
+ LOG(INFO) << __func__ << ": available commands";
+ onHelp(out);
+ return STATUS_OK;
+ }
+
+ for (auto&& str : std::vector<std::string_view>(args, args + numArgs)) {
+ std::string option = str.data();
+ if (option.find("clearconfig") != std::string::npos ||
+ option.find("resetconfig") != std::string::npos) {
+ resetConfigToDefault();
+ }
+ if (option.find("help") != std::string::npos) {
+ onHelp(out);
+ }
+ }
+
+ return STATUS_OK;
+}
+
+void Face::onHelp(int fd) {
+ dprintf(fd, "Virtual Face HAL commands:\n");
+ dprintf(fd, " help: print this help\n");
+ dprintf(fd, " resetconfig: reset all configuration to default\n");
+ dprintf(fd, "\n");
+ fsync(fd);
+}
+
+void Face::resetConfigToDefault() {
+ LOG(INFO) << __func__ << ": reset virtual Face HAL configuration to default";
+#define RESET_CONFIG_O(__NAME__) \
+ if (FaceHalProperties::__NAME__()) FaceHalProperties::__NAME__(std::nullopt)
+#define RESET_CONFIG_V(__NAME__) \
+ if (!FaceHalProperties::__NAME__().empty()) FaceHalProperties::__NAME__({std::nullopt})
+
+ RESET_CONFIG_O(type);
+ RESET_CONFIG_O(strength);
+ RESET_CONFIG_V(enrollments);
+ RESET_CONFIG_O(enrollment_hit);
+ RESET_CONFIG_V(features);
+ RESET_CONFIG_O(next_enrollment);
+ RESET_CONFIG_O(authenticator_id);
+ RESET_CONFIG_O(challenge);
+ RESET_CONFIG_O(lockout);
+ RESET_CONFIG_O(operation_authenticate_fails);
+ RESET_CONFIG_O(operation_detect_interaction_fails);
+ RESET_CONFIG_O(operation_enroll_fails);
+ RESET_CONFIG_V(operation_authenticate_latency);
+ RESET_CONFIG_V(operation_detect_interaction_latency);
+ RESET_CONFIG_V(operation_enroll_latency);
+ RESET_CONFIG_O(operation_authenticate_duration);
+ RESET_CONFIG_O(operation_authenticate_error);
+ RESET_CONFIG_O(operation_authenticate_acquired);
+ RESET_CONFIG_O(lockout_enable);
+ RESET_CONFIG_O(lockout_timed_enable);
+ RESET_CONFIG_O(lockout_timed_threshold);
+ RESET_CONFIG_O(lockout_timed_duration);
+ RESET_CONFIG_O(lockout_permanent_threshold);
+}
+
} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/Face.h b/biometrics/face/aidl/default/Face.h
index 786b4f8..93fddb0 100644
--- a/biometrics/face/aidl/default/Face.h
+++ b/biometrics/face/aidl/default/Face.h
@@ -17,16 +17,26 @@
#pragma once
#include <aidl/android/hardware/biometrics/face/BnFace.h>
+#include "Session.h"
namespace aidl::android::hardware::biometrics::face {
class Face : public BnFace {
public:
+ Face() : mSession(nullptr) {}
ndk::ScopedAStatus getSensorProps(std::vector<SensorProps>* _aidl_return) override;
ndk::ScopedAStatus createSession(int32_t sensorId, int32_t userId,
const std::shared_ptr<ISessionCallback>& cb,
std::shared_ptr<ISession>* _aidl_return) override;
+
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs);
+ binder_status_t handleShellCommand(int in, int out, int err, const char** argv, uint32_t argc);
+
+ private:
+ std::shared_ptr<Session> mSession;
+ void resetConfigToDefault();
+ void onHelp(int);
};
} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/FakeFaceEngine.cpp b/biometrics/face/aidl/default/FakeFaceEngine.cpp
index bdc13fd..bf75874 100644
--- a/biometrics/face/aidl/default/FakeFaceEngine.cpp
+++ b/biometrics/face/aidl/default/FakeFaceEngine.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#undef LOG_TAG
#define LOG_TAG "FaceVirtualHalEngine"
#include "FakeFaceEngine.h"
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
index 6f3f2fc..673d879 100644
--- a/biometrics/face/aidl/default/Session.cpp
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -14,20 +14,38 @@
* limitations under the License.
*/
+#undef LOG_TAG
+#define LOG_TAG "FaceVirtualHalSession"
+
#include <android-base/logging.h>
#include "Session.h"
-#undef LOG_TAG
-#define LOG_TAG "FaceVirtualHalSession"
-
namespace aidl::android::hardware::biometrics::face {
constexpr size_t MAX_WORKER_QUEUE_SIZE = 5;
+void onClientDeath(void* cookie) {
+ LOG(INFO) << "FaceService has died";
+ Session* session = static_cast<Session*>(cookie);
+ if (session && !session->isClosed()) {
+ session->close();
+ }
+}
+
Session::Session(std::unique_ptr<FakeFaceEngine> engine, std::shared_ptr<ISessionCallback> cb)
- : mEngine(std::move(engine)), mCb(std::move(cb)), mRandom(std::mt19937::default_seed) {
+ : mEngine(std::move(engine)),
+ mCb(std::move(cb)),
+ mRandom(std::mt19937::default_seed),
+ mStateClosed(false) {
+ CHECK(mEngine);
+ CHECK(mCb);
mThread = std::make_unique<WorkerThread>(MAX_WORKER_QUEUE_SIZE);
+ mDeathRecipient = AIBinder_DeathRecipient_new(onClientDeath);
+}
+
+binder_status_t Session::linkToDeath(AIBinder* binder) {
+ return AIBinder_linkToDeath(binder, mDeathRecipient, this);
}
ndk::ScopedAStatus Session::generateChallenge() {
@@ -144,9 +162,12 @@
}
ndk::ScopedAStatus Session::close() {
+ LOG(INFO) << "close";
if (mCb) {
mCb->onSessionClosed();
}
+ AIBinder_DeathRecipient_delete(mDeathRecipient);
+ mStateClosed = true;
return ndk::ScopedAStatus::ok();
}
diff --git a/biometrics/face/aidl/default/Session.h b/biometrics/face/aidl/default/Session.h
index ce6e7f1..f79ad00 100644
--- a/biometrics/face/aidl/default/Session.h
+++ b/biometrics/face/aidl/default/Session.h
@@ -33,6 +33,11 @@
using aidl::android::hardware::common::NativeHandle;
+enum class SessionState {
+ IDLING,
+ CLOSED,
+};
+
class Session : public BnSession {
public:
explicit Session(std::unique_ptr<FakeFaceEngine> engine, std::shared_ptr<ISessionCallback> cb);
@@ -93,12 +98,28 @@
const FaceEnrollOptions& options,
std::shared_ptr<common::ICancellationSignal>* out) override;
+ binder_status_t linkToDeath(AIBinder* binder);
+
+ virtual std::string toString() const {
+ std::ostringstream os;
+ os << std::endl << "----- Face::Session:: -----" << std::endl;
+ os << "mStateClosed:" << mStateClosed << std::endl;
+ os << mEngine->toString();
+
+ return os.str();
+ }
+
+ bool isClosed() { return mStateClosed; }
+
private:
std::unique_ptr<FakeFaceEngine> mEngine;
std::shared_ptr<ISessionCallback> mCb;
std::mt19937 mRandom;
std::unique_ptr<WorkerThread> mThread;
- std::shared_ptr<CancellationSignal> mCancellationSignal;
+
+ // Binder death handler.
+ AIBinder_DeathRecipient* mDeathRecipient;
+ bool mStateClosed;
};
} // namespace aidl::android::hardware::biometrics::face
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl
index 60cf82a..ac63c28 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl
@@ -39,7 +39,7 @@
int bitdepth;
int minBitrate;
int maxBitrate;
- boolean lowLatency;
- boolean lossless;
+ boolean lowLatency = false;
+ boolean lossless = false;
byte[] vendorSpecificParameters;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
index 1049d98..60c276b 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
@@ -74,8 +74,8 @@
const int EIGHT = 0x80;
}
parcelable SupportedOctetsPerCodecFrame {
- int minimum;
- int maximum;
+ int min;
+ int max;
}
parcelable SupportedMaxCodecFramesPerSDU {
int value;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
index baf0a4e..6b3cf72 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
@@ -38,8 +38,8 @@
const int NONE = 0x0000;
const int LOSSLESS = 0x0001;
const int LOW_LATENCY = 0x0002;
- const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0003;
- const int SPATIAL_AUDIO = 0x0004;
- const int PROVIDE_ASE_METADATA = 0x0005;
- const int MONO_MIC_CONFIGURATION = 0x0006;
+ const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0004;
+ const int SPATIAL_AUDIO = 0x0008;
+ const int PROVIDE_ASE_METADATA = 0x0010;
+ const int MONO_MIC_CONFIGURATION = 0x0020;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
index 87401ff..8d46c01 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
@@ -41,15 +41,17 @@
void updateAudioConfiguration(in android.hardware.bluetooth.audio.AudioConfiguration audioConfig);
void setLowLatencyModeAllowed(in boolean allowed);
android.hardware.bluetooth.audio.A2dpStatus parseA2dpConfiguration(in android.hardware.bluetooth.audio.CodecId codecId, in byte[] configuration, out android.hardware.bluetooth.audio.CodecParameters codecParameters);
- @nullable android.hardware.bluetooth.audio.A2dpConfiguration getA2dpConfiguration(in List<android.hardware.bluetooth.audio.A2dpRemoteCapabilities> remoteA2dpCapabilities, in android.hardware.bluetooth.audio.A2dpConfigurationHint hint);
+ @nullable android.hardware.bluetooth.audio.A2dpConfiguration getA2dpConfiguration(in android.hardware.bluetooth.audio.A2dpRemoteCapabilities[] remoteA2dpCapabilities, in android.hardware.bluetooth.audio.A2dpConfigurationHint hint);
void setCodecPriority(in android.hardware.bluetooth.audio.CodecId codecId, int priority);
- List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting> getLeAudioAseConfiguration(in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSinkAudioCapabilities, in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSourceAudioCapabilities, in List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement> requirements);
+ android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting[] getLeAudioAseConfiguration(in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities, in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities[] remoteSourceAudioCapabilities, in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement[] requirements);
android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationPair getLeAudioAseQosConfiguration(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement qosRequirement);
android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfigurationPair getLeAudioAseDatapathConfiguration(in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.StreamConfig sinkConfig, in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.StreamConfig sourceConfig);
void onSinkAseMetadataChanged(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.AseState state, int cigId, int cisId, in @nullable android.hardware.bluetooth.audio.MetadataLtv[] metadata);
void onSourceAseMetadataChanged(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.AseState state, int cigId, int cisId, in @nullable android.hardware.bluetooth.audio.MetadataLtv[] metadata);
- android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationSetting getLeAudioBroadcastConfiguration(in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSinkAudioCapabilities, in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationRequirement requirement);
- android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration getLeAudioBroadcastDatapathConfiguration(in android.hardware.bluetooth.audio.AudioContext context, in android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration.BroadcastStreamMap[] streamMap);
+ android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationSetting getLeAudioBroadcastConfiguration(in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities, in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationRequirement requirement);
+ android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration getLeAudioBroadcastDatapathConfiguration(in android.hardware.bluetooth.audio.AudioContext audioContext, in android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration.BroadcastStreamMap[] streamMap);
+ const int CODEC_PRIORITY_DISABLED = (-1) /* -1 */;
+ const int CODEC_PRIORITY_NONE = 0;
@VintfStability
parcelable LeAudioDeviceCapabilities {
android.hardware.bluetooth.audio.CodecId codecId;
@@ -97,8 +99,8 @@
parcelable LeAudioAseConfigurationSetting {
android.hardware.bluetooth.audio.AudioContext audioContext;
android.hardware.bluetooth.audio.IBluetoothAudioProvider.Packing packing;
- @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration> sinkAseConfiguration;
- @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration> sourceAseConfiguration;
+ @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration[] sinkAseConfiguration;
+ @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration[] sourceAseConfiguration;
@nullable android.hardware.bluetooth.audio.ConfigurationFlags flags;
@VintfStability
parcelable AseDirectionConfiguration {
@@ -110,8 +112,8 @@
@VintfStability
parcelable LeAudioConfigurationRequirement {
android.hardware.bluetooth.audio.AudioContext audioContext;
- @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement> sinkAseRequirement;
- @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement> sourceAseRequirement;
+ @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement[] sinkAseRequirement;
+ @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement[] sourceAseRequirement;
@nullable android.hardware.bluetooth.audio.ConfigurationFlags flags;
@VintfStability
parcelable AseDirectionRequirement {
@@ -120,7 +122,7 @@
}
@VintfStability
parcelable LeAudioAseQosConfigurationRequirement {
- android.hardware.bluetooth.audio.AudioContext contextType;
+ android.hardware.bluetooth.audio.AudioContext audioContext;
@nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement.AseQosDirectionRequirement sinkAseQosRequirement;
@nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement.AseQosDirectionRequirement sourceAseQosRequirement;
@nullable android.hardware.bluetooth.audio.ConfigurationFlags flags;
@@ -147,7 +149,7 @@
@nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration outputConfig;
}
parcelable StreamConfig {
- android.hardware.bluetooth.audio.AudioContext context;
+ android.hardware.bluetooth.audio.AudioContext audioContext;
android.hardware.bluetooth.audio.LeAudioConfiguration.StreamMap[] streamMap;
}
@Backing(type="byte") @VintfStability
@@ -163,13 +165,13 @@
}
@VintfStability
parcelable LeAudioBroadcastSubgroupConfigurationRequirement {
- android.hardware.bluetooth.audio.AudioContext context;
+ android.hardware.bluetooth.audio.AudioContext audioContext;
android.hardware.bluetooth.audio.IBluetoothAudioProvider.BroadcastQuality quality;
int bisNumPerSubgroup;
}
@VintfStability
parcelable LeAudioBroadcastConfigurationRequirement {
- List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfigurationRequirement> subgroupConfigurationRequirements;
+ android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfigurationRequirement[] subgroupConfigurationRequirements;
}
@VintfStability
parcelable LeAudioSubgroupBisConfiguration {
@@ -178,7 +180,7 @@
}
@VintfStability
parcelable LeAudioBroadcastSubgroupConfiguration {
- List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioSubgroupBisConfiguration> bisConfigurations;
+ android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioSubgroupBisConfiguration[] bisConfigurations;
@nullable byte[] vendorCodecConfiguration;
}
@VintfStability
@@ -192,6 +194,6 @@
android.hardware.bluetooth.audio.IBluetoothAudioProvider.Packing packing;
android.hardware.bluetooth.audio.IBluetoothAudioProvider.Framing framing;
@nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration dataPathConfiguration;
- List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfiguration> subgroupsConfigurations;
+ android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfiguration[] subgroupsConfigurations;
}
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl
index a7fd9ff..db5212f 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl
@@ -26,6 +26,7 @@
parcelable A2dpConfiguration {
/**
* Remote Stream Endpoint Identifier
+ * This matches `A2dpRemoteCapabilities.seid` given by the framework.
*/
int remoteSeid;
@@ -35,7 +36,7 @@
* `configuration`. Using `id.a2dp`, the format is given by the `Codec
* Specific Information Elements` [A2DP - 4.3-6.2], and using `id.vendor`,
* by `Vendor Specific Value` [A2DP - 4.7.2].
- * In any case, this byte array is limited by the framework to 128 Bytes.
+ * In any case, this byte array must be limited to 128 bytes.
*/
CodecId id;
CodecParameters parameters;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl
index 87277f1..224bb60 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl
@@ -25,6 +25,8 @@
parcelable A2dpRemoteCapabilities {
/**
* Remote Stream Endpoint identifier
+ * Allocated by the remote device to identify a specific codec and capabilities,
+ * in the meaning of the AVDTP standard.
*/
int seid;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl
index 2a0c4d8..b8521f4 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl
@@ -21,7 +21,9 @@
@VintfStability
parcelable A2dpStreamConfiguration {
/**
- * Peer MTU (16 bits)
+ * Peer Maximum Transfer Unit (MTU), 16 bits value [Core - 3.A.5.1]
+ * It's the remote device indication of the maximum amount of data that
+ * can be received on the AVDTP Stream Channel.
*/
int peerMtu;
@@ -29,6 +31,7 @@
* Optional SCMS-T Content Protection header
* that precedes audio content when enabled [A2DP - 3.2.1-2].
* The content protection byte is defined by [Assigned Number - 6.3.2].
+ * When the content protection is not enabled, this field should be left `null`.
*/
@nullable byte[1] cpHeaderScmst;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl
index 896a712..2243957 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl
@@ -32,7 +32,7 @@
/**
* Vendor Codec:
- * id 16 bits - Assigned by BT Sig
+ * id 16 bits - Vendor identifier, assigned by BT Sig [Assigned Numbers - 7.1]
* codecId 16 bits - Assigned by the vendor
*/
parcelable Vendor {
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl
index 33f0c04..b60d70f 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl
@@ -26,9 +26,12 @@
@VintfStability
parcelable CodecInfo {
/**
- * Codec identifier and human readable name
+ * Codec identifier
*/
CodecId id;
+ /**
+ * Human readable name used to present codec to the user and for debug logs
+ */
String name;
/**
@@ -92,17 +95,18 @@
*/
parcelable LeAudio {
/**
- * Channel configuration: Mono, Dual-Mono or Stereo
+ * List of independently supported channel modes: Mono, Dual-Mono, or
+ * Stereo.
*/
ChannelMode[] channelMode;
/**
- * Supported sampling frequencies, in Hz.
+ * List of supported sampling frequencies, in Hz.
*/
int[] samplingFrequencyHz;
- /*
- * FrameDuration in microseconds.
+ /**
+ * List of supported FrameDurations in microseconds.
*/
int[] frameDurationUs;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl
index b6f8a94..37f8942 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl
@@ -35,24 +35,29 @@
int bitdepth;
/**
- * Encoding parameters:
- *
- * - Bitrate limits on a frame basis, defined in bits per second.
- * The encoder bitrate mode can be encoded following this rule:
- * . minBitrate equals to maxBitrate for constant bitrate
- * . minBitrate set to 0, for VBR with peak bitrate at maxBitratre value.
- * . minBitrate greater than 0, for ABR, the bitrate of the stream varies
- * between minBitrate to maxBitrate according to link quality.
- * The 0 value for both means "undefined" or "don't care".
- *
- * - Low-latency configuration privileged
- * - Lossless effort indication. The 'False' value can be used as "don't care"
+ * Bitrate limits on a frame basis, defined in bits per second.
+ * The encoder bitrate mode can be encoded following this rule:
+ * . minBitrate equals to maxBitrate for constant bitrate
+ * . minBitrate set to 0, for VBR with peak bitrate at maxBitratre value.
+ * . minBitrate greater than 0, for ABR, the bitrate of the stream varies
+ * between minBitrate to maxBitrate according to link quality.
+ * The 0 value for both means "undefined" or "don't care".
*/
int minBitrate;
int maxBitrate;
- boolean lowLatency;
- boolean lossless;
+ /**
+ * Low-latency configuration. The interpretation is vendor specific.
+ * When returned to the client, the assessment of the low latency configuration is left
+ * to the vendor's discretion. When set by the client, it indicates that we are entering
+ * a low-latency context (e.g. gaming), and such a configuration should be privileged.
+ */
+ boolean lowLatency = false;
+
+ /**
+ * Lossless effort indication. The 'False' value can be used as "don't care"
+ */
+ boolean lossless = false;
/**
* Vendor specific parameters, inserted in the Vendor Specific HCI Command
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
index ceb90ba..fa302e3 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
@@ -23,6 +23,9 @@
*/
@VintfStability
union CodecSpecificCapabilitiesLtv {
+ /**
+ * Supported sampling frequencies in Hertz
+ */
parcelable SupportedSamplingFrequencies {
const int HZ8000 = 0x0001;
const int HZ11025 = 0x0002;
@@ -41,10 +44,13 @@
/* 16 bits wide bit mask */
int bitmask;
}
+ /**
+ * Supported frame durations in microseconds
+ */
parcelable SupportedFrameDurations {
const int US7500 = 0x01;
const int US10000 = 0x02;
- // Bits 2-3 are RFU
+ /* Bits 2-3 are RFU */
const int US7500PREFERRED = 0x10;
const int US10000PREFERRED = 0x20;
@@ -65,8 +71,8 @@
int bitmask;
}
parcelable SupportedOctetsPerCodecFrame {
- int minimum;
- int maximum;
+ int min;
+ int max;
}
parcelable SupportedMaxCodecFramesPerSDU {
int value;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
index 57c8be5..a12af49 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
@@ -22,33 +22,33 @@
@VintfStability
parcelable ConfigurationFlags {
const int NONE = 0x0000;
- /*
+ /**
* Set for the lossless configurations
*/
const int LOSSLESS = 0x0001;
- /*
+ /**
* Set for the low latency configurations
*/
const int LOW_LATENCY = 0x0002;
- /*
+ /**
* When set, asymmetric configuration for SINK and SOURCE can be used.
* e.g. in GAMING mode stream for 32kHz and back channel for 16 kHz
*/
- const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0003;
- /*
+ const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0004;
+ /**
* Set for the spatial audio configurations
*/
- const int SPATIAL_AUDIO = 0x0004;
- /*
+ const int SPATIAL_AUDIO = 0x0008;
+ /**
* When set, BluetoothAudioProvider requests to receive ASE metadata.
* In such case onSinkAseMetadataChanged() and onSourceAseMetadataChanged
* will be called.
*/
- const int PROVIDE_ASE_METADATA = 0x0005;
- /*
+ const int PROVIDE_ASE_METADATA = 0x0010;
+ /**
* Set for mono microphone configurations
*/
- const int MONO_MIC_CONFIGURATION = 0x0006;
+ const int MONO_MIC_CONFIGURATION = 0x0020;
int bitmask;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
index 8c6fe69..33af8a4 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
@@ -133,17 +133,34 @@
* when no suitable configuration has been found.
*/
@nullable A2dpConfiguration getA2dpConfiguration(
- in List<A2dpRemoteCapabilities> remoteA2dpCapabilities, in A2dpConfigurationHint hint);
+ in A2dpRemoteCapabilities[] remoteA2dpCapabilities, in A2dpConfigurationHint hint);
+
+ /**
+ * Predefined values for the codec priority, used by `setCodecPriority()`.
+ * Besides these special values, the codec priority can be set to 1 for
+ * the highest possible priority, or to any other 4 bytes wide integer N,
+ * where N has the higher priority than N + 1.
+ */
+ const int CODEC_PRIORITY_DISABLED = -1;
+ const int CODEC_PRIORITY_NONE = 0;
/**
* Set specific codec priority
*
* It should be assumed that the external module will start with all its
- * integrated codecs priority 0 by default.
+ * integrated codecs priority set to `CODEC_PRIORITY_NONE` by default.
+ *
+ * Note: If the BT stack sets a particular codec priority to
+ * CODEC_PRIORITY_DISABLED, the configuration provider shal not return
+ * a particular codec when asked for the configuration. Other priority
+ * levels and the prioritization mechanism details are not specified
+ * and the vendor can implement them as desired.
*
* @param codecId: codecId
- * @param priority: 0 for no priority, -1 for codec disabled,
- * from 1 to N, where 1 is highest.
+ * @param priority: `CODEC_PRIORITY_NONE` for no priority,
+ * `CODEC_PRIORITY_DISABLED` for the disabled codec, or priority
+ * level from 1 to N, where the priority of N + 1 is lower than N,
+ * and N equal to 1 is the highest possible codec priority.
*/
void setCodecPriority(in CodecId codecId, int priority);
@@ -240,7 +257,8 @@
IsoDataPathConfiguration isoDataPathConfiguration;
}
- /* All the LeAudioAseQosConfiguration parameters are defined by the
+ /**
+ * All the LeAudioAseQosConfiguration parameters are defined by the
* Bluetooth Audio Stream Control Service specification v.1.0, Sec. 5: "ASE
* Control Operations".
*/
@@ -330,11 +348,11 @@
/**
* Sink ASEs configuration
*/
- @nullable List<AseDirectionConfiguration> sinkAseConfiguration;
+ @nullable AseDirectionConfiguration[] sinkAseConfiguration;
/**
* Source ASEs configuration
*/
- @nullable List<AseDirectionConfiguration> sourceAseConfiguration;
+ @nullable AseDirectionConfiguration[] sourceAseConfiguration;
/**
* Additional flags, used for configurations with special features
*/
@@ -371,11 +389,11 @@
/**
* Sink ASEs configuration setting
*/
- @nullable List<AseDirectionRequirement> sinkAseRequirement;
+ @nullable AseDirectionRequirement[] sinkAseRequirement;
/**
* Source ASEs configuration setting
*/
- @nullable List<AseDirectionRequirement> sourceAseRequirement;
+ @nullable AseDirectionRequirement[] sourceAseRequirement;
/**
* Additional flags, used to request configurations with special
* features
@@ -395,25 +413,57 @@
* BluetoothStack expects to get configuration list for SINK and SOURCE
* on either _ENCODING or _DECODING session.
*
- * @param remoteSinkAudioCapabilities List of remote sink capabilities
+ * Note: When the requirements are not met, either for one or both
+ * directions, the corresponding returned AseDirectionConfiguration
+ * can be set to null. Otherwise it shall contain an ASE configuration
+ * array with the number of configurations equal to the number of ASEs
+ * which should be configured by the BT stack for this particular
+ * direction.
+ * The provider shall match all the requirements set by the Bluetooth
+ * stack or return a null configuration for the direction when these
+ * requirements are not met. In response, the BT Stack may decide to
+ * reduce the requirements to the minimum, which is the `audioContext`
+ * and the `LeAudioAseConfiguration.codecConfiguration` with the
+ * mandatory `CodecSpecificConfigurationLtv.SamplingFrequency` and
+ * `CodecSpecificConfigurationLtv.AudioChannelAllocation` fields set.
+ * When these minimum requirements are not met as well, the Bt stack
+ * may set either `sinkAseRequirement` or `sourceAseRequirement`, or
+ * both to null. In such case the provider has the freedom of
+ * providing a configuration for the null-ed direction requirements or
+ * not for the particular audio context. However returning neither of
+ * the direction configurations (both nulled) is considered as an
+ * invalid behavior.
+ * If the returned configurations are not complete (either
+ * `qosConfiguration` or `dataPathConfiguration` are null), the BT
+ * stack will ask for these dynamically during the stream
+ * establishment, using the corresponding
+ * `getLeAudioAseQosConfiguration()` and
+ * `getLeAudioAseDatapathConfiguration()` API calls. This behavior
+ * is not desired as it slows down the stream establishment, and
+ * should be implemented only if really needed (e.g. when the provider
+ * needs to monitor the remote device ASE states, using the
+ * `onSinkAseMetadataChanged()` and `onSourceAseMetadataChanged()`
+ * callbacks to derive the valid QoS and/or data path configuration).
+ *
+ * @param remoteSinkAudioCapabilities Array of remote sink capabilities
* supported by an active group devices.
- * @param remoteSourceAudioCapabilities List of remote source capabilities
+ * @param remoteSourceAudioCapabilities Array of remote source capabilities
* supported by an active group devices.
* @param requirements ASE configuration requirements
*
- * @return List<LeAudioAseConfigurationSetting>
+ * @return LeAudioAseConfigurationSetting[]
*/
- List<LeAudioAseConfigurationSetting> getLeAudioAseConfiguration(
- in @nullable List<LeAudioDeviceCapabilities> remoteSinkAudioCapabilities,
- in @nullable List<LeAudioDeviceCapabilities> remoteSourceAudioCapabilities,
- in List<LeAudioConfigurationRequirement> requirements);
+ LeAudioAseConfigurationSetting[] getLeAudioAseConfiguration(
+ in @nullable LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities,
+ in @nullable LeAudioDeviceCapabilities[] remoteSourceAudioCapabilities,
+ in LeAudioConfigurationRequirement[] requirements);
@VintfStability
parcelable LeAudioAseQosConfigurationRequirement {
/**
* Audio Contect Type that this requirements apply to
*/
- AudioContext contextType;
+ AudioContext audioContext;
/**
* QoS preferences received in Codec Configured ASE state. As defined in
@@ -501,6 +551,18 @@
* parameters are not within the boundaries received from the remote device
* after configuring the ASEs.
*
+ * Note: When the requirements are not met, either for one or both
+ * directions, the corresponding configurations in the returned
+ * LeAudioAseQosConfigurationPair can be set to null. The minimum
+ * requirement can have only the `audioContext` field set and just a
+ * single (either sink or source) AseQosDirectionRequirement, where
+ * only the preferred parameter fields are not specified. The
+ * configuration provider should always be able to satisfy such
+ * requirement for all the audio contexts specified by Bluetooth SIG.
+ * The Bluetooth stack can reduce the requirements to the minimum,
+ * when more precisely specified requirements are not met by the
+ * configuration provider.
+ *
* @param qosRequirement ASE QoS configurations requirements
*
* @return LeAudioAseQosConfigurationPair
@@ -527,7 +589,7 @@
* This can serve as a hint for selecting the proper configuration by
* the offloader.
*/
- AudioContext context;
+ AudioContext audioContext;
/**
* Stream configuration, including connection handles and audio channel
* allocations.
@@ -545,13 +607,25 @@
* @param sinkConfig - remote sink device stream configuration
* @param sourceConfig - remote source device stream configuration
*
+ * Note: The provider shall provide a data path configuration for each
+ * of the non-null configurations passed to this function if these
+ * configurations are supported by the configuration provider.
+ * The Bluetooth stack can set either only sink or source
+ * configuration if it expects just a single direction data path
+ * configuration. Not providing a valid data path configuration for
+ * the stream configured with the codec parameters provided by the
+ * configuration provider will be considered an invalid behavior.
+ * The BT stack can pass asymmetric sink and source configurations
+ * if `ALLOW_ASYMMETRIC_CONFIGURATIONS` flag was set by the provider
+ * in the `CodecInfo` information for the particular codec.
+ *
* @return LeAudioDataPathConfigurationPair
*/
LeAudioDataPathConfigurationPair getLeAudioAseDatapathConfiguration(
in @nullable StreamConfig sinkConfig,
in @nullable StreamConfig sourceConfig);
- /*
+ /**
* Audio Stream Endpoint state used to report Metadata changes on the remote
* device audio endpoints.
*/
@@ -564,14 +638,32 @@
}
/**
- * Used to report metadata changes to the provider. This allows for a
- * pseudo communication channel between the remote device and the provider,
- * using the vendor specific metadata of the changing ASE state.
- * It is used only when ASE is using configurations marked with the
- * `PROVIDE_ASE_METADATA` flag.
+ * Used to report sink endpoint metadata changes to the provider. This
+ * allows for a pseudo communication channel between the remote device and
+ * the provider, using the vendor specific metadata of the changing ASE
+ * state. It is used only when Audio Stream Endpoint (ASE) is using
+ * configurations marked with the `PROVIDE_ASE_METADATA` flag.
+ *
+ * @param state - current Audio Stream Endpoint state of the remote device
+ * @param cigId - Coordinate Isochronous Group identifier
+ * @param cisId - Coordinate Isochronous Stream identifier
+ * @param metadata - remote sink device metadata for the given ASE
*/
void onSinkAseMetadataChanged(
in AseState state, int cigId, int cisId, in @nullable MetadataLtv[] metadata);
+
+ /**
+ * Used to report source endpoint metadata changes to the provider. This
+ * allows for a pseudo communication channel between the remote device and
+ * the provider, using the vendor specific metadata of the changing ASE
+ * state. It is used only when Audio Stream Endpoint (ASE) is using
+ * configurations marked with the `PROVIDE_ASE_METADATA` flag.
+ *
+ * @param state - current Audio Stream Endpoint state of the remote device
+ * @param cigId - Coordinate Isochronous Group identifier
+ * @param cisId - Coordinate Isochronous Stream identifier
+ * @param metadata - remote source device metadata for the given ASE
+ */
void onSourceAseMetadataChanged(
in AseState state, int cigId, int cisId, in @nullable MetadataLtv[] metadata);
@@ -595,7 +687,7 @@
* This can serve as a hint for selecting the proper configuration by
* the offloader.
*/
- AudioContext context;
+ AudioContext audioContext;
/**
* Streaming Broadcast Audio Quality
*/
@@ -614,7 +706,7 @@
*/
@VintfStability
parcelable LeAudioBroadcastConfigurationRequirement {
- List<LeAudioBroadcastSubgroupConfigurationRequirement> subgroupConfigurationRequirements;
+ LeAudioBroadcastSubgroupConfigurationRequirement[] subgroupConfigurationRequirements;
}
/**
@@ -635,11 +727,10 @@
/**
* Subgroup configuration with a list of BIS configurations
- *
*/
@VintfStability
parcelable LeAudioBroadcastSubgroupConfiguration {
- List<LeAudioSubgroupBisConfiguration> bisConfigurations;
+ LeAudioSubgroupBisConfiguration[] bisConfigurations;
/**
* Vendor specific codec configuration for all the BISes inside this
@@ -659,7 +750,6 @@
* LeAudioBroadcastConfigurationSetting is a result of
* getLeAudioBroadcastConfiguration. It is used in HCI_LE_Create_BIG command
* and for creating the Broadcast Announcements.
- *
*/
@VintfStability
parcelable LeAudioBroadcastConfigurationSetting {
@@ -705,18 +795,23 @@
@nullable LeAudioDataPathConfiguration dataPathConfiguration;
/**
- * A list of subgroup configurations in the broadcast.
+ * An array of subgroup configurations in the broadcast.
*/
- List<LeAudioBroadcastSubgroupConfiguration> subgroupsConfigurations;
+ LeAudioBroadcastSubgroupConfiguration[] subgroupsConfigurations;
}
/**
* Get Broadcast configuration. Output of this function will be used
* in HCI_LE_Create_BIG (0x0068) command and also to create BIG INFO
*
+ * @param remoteSinkAudioCapabilities - remote device sink endpoint
+ * capabilities
+ * @param requirement - requested configuration requirements
+ *
+ * @return the whole broadcast audio stream configuration
*/
LeAudioBroadcastConfigurationSetting getLeAudioBroadcastConfiguration(
- in @nullable List<LeAudioDeviceCapabilities> remoteSinkAudioCapabilities,
+ in @nullable LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities,
in LeAudioBroadcastConfigurationRequirement requirement);
/**
@@ -725,7 +820,12 @@
* not provided in LeAudioBroadcastConfigurationSetting. Calling this during
* the broadcast audio stream establishment might slightly delay the stream
* start.
+ *
+ * @param audioContext - audio stream context for the given stream map
+ * @param streamMap - channel map with BIS configurations
+ *
+ * @return broadcast audio stream data path configuration
*/
LeAudioDataPathConfiguration getLeAudioBroadcastDatapathConfiguration(
- in AudioContext context, in BroadcastStreamMap[] streamMap);
+ in AudioContext audioContext, in BroadcastStreamMap[] streamMap);
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl
index b0befc1..afe76ce 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl
@@ -30,8 +30,9 @@
parcelable StreamingAudioContexts {
AudioContext values;
}
- /* This is an opaque container for passing metadata between the provider and
- * the remote device. It must not be interpreted by the BT stack.
+ /**
+ * This is an opaque container for passing metadata between the provider and
+ * the remote device. It shall not be inspected by the BT stack.
*/
parcelable VendorSpecific {
int companyId;
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp
index ba7a89d..c7761c5 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.cpp
@@ -23,7 +23,6 @@
#include <android-base/logging.h>
#include "A2dpOffloadCodecAac.h"
-#include "A2dpOffloadCodecFactory.h"
#include "A2dpOffloadCodecSbc.h"
namespace aidl {
@@ -32,17 +31,21 @@
namespace bluetooth {
namespace audio {
-A2dpOffloadEncodingAudioProvider::A2dpOffloadEncodingAudioProvider()
- : A2dpOffloadAudioProvider() {
+A2dpOffloadEncodingAudioProvider::A2dpOffloadEncodingAudioProvider(
+ const A2dpOffloadCodecFactory& codec_factory)
+ : A2dpOffloadAudioProvider(codec_factory) {
session_type_ = SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH;
}
-A2dpOffloadDecodingAudioProvider::A2dpOffloadDecodingAudioProvider()
- : A2dpOffloadAudioProvider() {
+A2dpOffloadDecodingAudioProvider::A2dpOffloadDecodingAudioProvider(
+ const A2dpOffloadCodecFactory& codec_factory)
+ : A2dpOffloadAudioProvider(codec_factory) {
session_type_ = SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH;
}
-A2dpOffloadAudioProvider::A2dpOffloadAudioProvider() {}
+A2dpOffloadAudioProvider::A2dpOffloadAudioProvider(
+ const A2dpOffloadCodecFactory& codec_factory)
+ : codec_factory_(codec_factory) {}
bool A2dpOffloadAudioProvider::isValid(const SessionType& session_type) {
return (session_type == session_type_);
@@ -56,17 +59,29 @@
auto a2dp_config = audio_config.get<AudioConfiguration::Tag::a2dp>();
A2dpStatus a2dp_status = A2dpStatus::NOT_SUPPORTED_CODEC_TYPE;
- if (a2dp_config.codecId ==
- A2dpOffloadCodecSbc::GetInstance()->GetCodecId()) {
- SbcParameters sbc_parameters;
- a2dp_status = A2dpOffloadCodecSbc::GetInstance()->ParseConfiguration(
- a2dp_config.configuration, &sbc_parameters);
+ auto codec = codec_factory_.GetCodec(a2dp_config.codecId);
+ if (!codec) {
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
+ << " - CodecId=" << a2dp_config.codecId.toString()
+ << " is not found";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
- } else if (a2dp_config.codecId ==
- A2dpOffloadCodecAac::GetInstance()->GetCodecId()) {
+ if (codec->info.id == CodecId(CodecId::A2dp::SBC)) {
+ SbcParameters sbc_parameters;
+
+ auto codec_sbc =
+ std::static_pointer_cast<const A2dpOffloadCodecSbc>(codec);
+ a2dp_status = codec_sbc->ParseConfiguration(a2dp_config.configuration,
+ &sbc_parameters);
+
+ } else if (codec->info.id == CodecId(CodecId::A2dp::AAC)) {
AacParameters aac_parameters;
- a2dp_status = A2dpOffloadCodecAac::GetInstance()->ParseConfiguration(
- a2dp_config.configuration, &aac_parameters);
+
+ auto codec_aac =
+ std::static_pointer_cast<const A2dpOffloadCodecAac>(codec);
+ a2dp_status = codec_aac->ParseConfiguration(a2dp_config.configuration,
+ &aac_parameters);
}
if (a2dp_status != A2dpStatus::OK) {
LOG(WARNING) << __func__ << " - Invalid Audio Configuration="
@@ -105,7 +120,7 @@
ndk::ScopedAStatus A2dpOffloadAudioProvider::parseA2dpConfiguration(
const CodecId& codec_id, const std::vector<uint8_t>& configuration,
CodecParameters* codec_parameters, A2dpStatus* _aidl_return) {
- auto codec = A2dpOffloadCodecFactory::GetInstance()->GetCodec(codec_id);
+ auto codec = codec_factory_.GetCodec(codec_id);
if (!codec) {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
<< " - CodecId=" << codec_id.toString() << " is not found";
@@ -124,8 +139,8 @@
*_aidl_return = std::nullopt;
A2dpConfiguration avdtp_configuration;
- if (A2dpOffloadCodecFactory::GetInstance()->GetConfiguration(
- remote_a2dp_capabilities, hint, &avdtp_configuration))
+ if (codec_factory_.GetConfiguration(remote_a2dp_capabilities, hint,
+ &avdtp_configuration))
*_aidl_return =
std::make_optional<A2dpConfiguration>(std::move(avdtp_configuration));
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.h b/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.h
index 7cc6dee..a2d03fe 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.h
+++ b/bluetooth/audio/aidl/default/A2dpOffloadAudioProvider.h
@@ -16,6 +16,7 @@
#pragma once
+#include "A2dpOffloadCodecFactory.h"
#include "BluetoothAudioProvider.h"
namespace aidl {
@@ -26,8 +27,6 @@
class A2dpOffloadAudioProvider : public BluetoothAudioProvider {
public:
- A2dpOffloadAudioProvider();
-
bool isValid(const SessionType& session_type) override;
ndk::ScopedAStatus startSession(
@@ -45,18 +44,23 @@
const A2dpConfigurationHint& hint,
std::optional<audio::A2dpConfiguration>* _aidl_return) override;
+ protected:
+ A2dpOffloadAudioProvider(const A2dpOffloadCodecFactory&);
+
private:
+ const A2dpOffloadCodecFactory& codec_factory_;
+
ndk::ScopedAStatus onSessionReady(DataMQDesc* _aidl_return) override;
};
class A2dpOffloadEncodingAudioProvider : public A2dpOffloadAudioProvider {
public:
- A2dpOffloadEncodingAudioProvider();
+ A2dpOffloadEncodingAudioProvider(const A2dpOffloadCodecFactory&);
};
class A2dpOffloadDecodingAudioProvider : public A2dpOffloadAudioProvider {
public:
- A2dpOffloadDecodingAudioProvider();
+ A2dpOffloadDecodingAudioProvider(const A2dpOffloadCodecFactory&);
};
} // namespace audio
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodec.h b/bluetooth/audio/aidl/default/A2dpOffloadCodec.h
index 7ed5872..2f51c73 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodec.h
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodec.h
@@ -18,10 +18,9 @@
#include <aidl/android/hardware/bluetooth/audio/A2dpStatus.h>
#include <aidl/android/hardware/bluetooth/audio/ChannelMode.h>
+#include <aidl/android/hardware/bluetooth/audio/CodecInfo.h>
#include <aidl/android/hardware/bluetooth/audio/CodecParameters.h>
-#include "BluetoothAudioProviderFactory.h"
-
namespace aidl::android::hardware::bluetooth::audio {
class A2dpOffloadCodec {
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.cpp b/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.cpp
index 0f5533a..1570cd8 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.cpp
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.cpp
@@ -194,11 +194,6 @@
* AAC Class implementation
*/
-const A2dpOffloadCodecAac* A2dpOffloadCodecAac::GetInstance() {
- static A2dpOffloadCodecAac instance;
- return &instance;
-}
-
A2dpOffloadCodecAac::A2dpOffloadCodecAac()
: A2dpOffloadCodec(info_),
info_({.id = CodecId(CodecId::A2dp::AAC), .name = "AAC"}) {
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.h b/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.h
index eefa89b..65e927d 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.h
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodecAac.h
@@ -29,14 +29,12 @@
class A2dpOffloadCodecAac : public A2dpOffloadCodec {
CodecInfo info_;
- A2dpOffloadCodecAac();
-
A2dpStatus ParseConfiguration(const std::vector<uint8_t>& configuration,
CodecParameters* codec_parameters,
AacParameters* aac_parameters) const;
public:
- static const A2dpOffloadCodecAac* GetInstance();
+ A2dpOffloadCodecAac();
A2dpStatus ParseConfiguration(
const std::vector<uint8_t>& configuration,
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.cpp b/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.cpp
index 73d8fb1..658073c 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.cpp
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.cpp
@@ -37,20 +37,18 @@
* Class implementation
*/
-const A2dpOffloadCodecFactory* A2dpOffloadCodecFactory::GetInstance() {
- static A2dpOffloadCodecFactory instance;
- return &instance;
-}
-
A2dpOffloadCodecFactory::A2dpOffloadCodecFactory()
: name("Offload"), codecs(ranked_codecs_) {
ranked_codecs_.reserve(kEnableAac + kEnableSbc);
- if (kEnableAac) ranked_codecs_.push_back(A2dpOffloadCodecAac::GetInstance());
- if (kEnableSbc) ranked_codecs_.push_back(A2dpOffloadCodecSbc::GetInstance());
+ if (kEnableAac)
+ ranked_codecs_.push_back(std::make_shared<A2dpOffloadCodecAac>());
+ if (kEnableSbc)
+ ranked_codecs_.push_back(std::make_shared<A2dpOffloadCodecSbc>());
}
-const A2dpOffloadCodec* A2dpOffloadCodecFactory::GetCodec(CodecId id) const {
+std::shared_ptr<const A2dpOffloadCodec> A2dpOffloadCodecFactory::GetCodec(
+ CodecId id) const {
auto codec = std::find_if(begin(ranked_codecs_), end(ranked_codecs_),
[&](auto c) { return id == c->info.id; });
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.h b/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.h
index 3fb5b1d..1546cc4 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.h
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodecFactory.h
@@ -16,22 +16,26 @@
#pragma once
+#include <aidl/android/hardware/bluetooth/audio/A2dpConfiguration.h>
+#include <aidl/android/hardware/bluetooth/audio/A2dpConfigurationHint.h>
+#include <aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.h>
+
+#include <memory>
+
#include "A2dpOffloadCodec.h"
namespace aidl::android::hardware::bluetooth::audio {
class A2dpOffloadCodecFactory {
- std::vector<const A2dpOffloadCodec*> ranked_codecs_;
-
- A2dpOffloadCodecFactory();
+ std::vector<std::shared_ptr<const A2dpOffloadCodec>> ranked_codecs_;
public:
const std::string name;
- const std::vector<const A2dpOffloadCodec*>& codecs;
+ const std::vector<std::shared_ptr<const A2dpOffloadCodec>>& codecs;
- static const A2dpOffloadCodecFactory* GetInstance();
+ A2dpOffloadCodecFactory();
- const A2dpOffloadCodec* GetCodec(CodecId id) const;
+ std::shared_ptr<const A2dpOffloadCodec> GetCodec(CodecId id) const;
bool GetConfiguration(const std::vector<A2dpRemoteCapabilities>&,
const A2dpConfigurationHint& hint,
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.cpp b/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.cpp
index 36d8f72..6b9046c 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.cpp
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.cpp
@@ -257,11 +257,6 @@
* SBC Class implementation
*/
-const A2dpOffloadCodecSbc* A2dpOffloadCodecSbc::GetInstance() {
- static A2dpOffloadCodecSbc instance;
- return &instance;
-}
-
A2dpOffloadCodecSbc::A2dpOffloadCodecSbc()
: A2dpOffloadCodec(info_),
info_({.id = CodecId(CodecId::A2dp::SBC), .name = "SBC"}) {
diff --git a/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.h b/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.h
index c380850..a39d779 100644
--- a/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.h
+++ b/bluetooth/audio/aidl/default/A2dpOffloadCodecSbc.h
@@ -33,14 +33,12 @@
class A2dpOffloadCodecSbc : public A2dpOffloadCodec {
CodecInfo info_;
- A2dpOffloadCodecSbc();
-
A2dpStatus ParseConfiguration(const std::vector<uint8_t>& configuration,
CodecParameters* codec_parameters,
SbcParameters* sbc_parameters) const;
public:
- static const A2dpOffloadCodecSbc* GetInstance();
+ A2dpOffloadCodecSbc();
A2dpStatus ParseConfiguration(
const std::vector<uint8_t>& configuration,
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp
index e55a434..c7c6e6d 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp
@@ -22,7 +22,6 @@
#include <android-base/logging.h>
#include "A2dpOffloadAudioProvider.h"
-#include "A2dpOffloadCodecFactory.h"
#include "A2dpSoftwareAudioProvider.h"
#include "BluetoothAudioProvider.h"
#include "HearingAidAudioProvider.h"
@@ -53,7 +52,8 @@
provider = ndk::SharedRefBase::make<A2dpSoftwareEncodingAudioProvider>();
break;
case SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH:
- provider = ndk::SharedRefBase::make<A2dpOffloadEncodingAudioProvider>();
+ provider = ndk::SharedRefBase::make<A2dpOffloadEncodingAudioProvider>(
+ a2dp_offload_codec_factory_);
break;
case SessionType::HEARING_AID_SOFTWARE_ENCODING_DATAPATH:
provider = ndk::SharedRefBase::make<HearingAidAudioProvider>();
@@ -82,7 +82,8 @@
provider = ndk::SharedRefBase::make<A2dpSoftwareDecodingAudioProvider>();
break;
case SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH:
- provider = ndk::SharedRefBase::make<A2dpOffloadDecodingAudioProvider>();
+ provider = ndk::SharedRefBase::make<A2dpOffloadDecodingAudioProvider>(
+ a2dp_offload_codec_factory_);
break;
case SessionType::HFP_SOFTWARE_ENCODING_DATAPATH:
provider = ndk::SharedRefBase::make<HfpSoftwareOutputAudioProvider>();
@@ -160,8 +161,8 @@
session_type == SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH) {
auto& provider_info = _aidl_return->emplace();
- provider_info.name = A2dpOffloadCodecFactory::GetInstance()->name;
- for (auto codec : A2dpOffloadCodecFactory::GetInstance()->codecs)
+ provider_info.name = a2dp_offload_codec_factory_.name;
+ for (auto codec : a2dp_offload_codec_factory_.codecs)
provider_info.codecInfos.push_back(codec->info);
}
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h
index 1afae64..6931884 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h
@@ -18,6 +18,8 @@
#include <aidl/android/hardware/bluetooth/audio/BnBluetoothAudioProviderFactory.h>
+#include "A2dpOffloadCodecFactory.h"
+
namespace aidl {
namespace android {
namespace hardware {
@@ -25,6 +27,8 @@
namespace audio {
class BluetoothAudioProviderFactory : public BnBluetoothAudioProviderFactory {
+ const A2dpOffloadCodecFactory a2dp_offload_codec_factory_;
+
public:
BluetoothAudioProviderFactory();
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
index cff3b25..a692d84 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
@@ -157,8 +157,11 @@
bool LeAudioOffloadAudioProvider::isMatchedValidCodec(CodecId cfg_codec,
CodecId req_codec) {
auto priority = codec_priority_map_.find(cfg_codec);
- if (priority != codec_priority_map_.end() && priority->second == -1)
+ if (priority != codec_priority_map_.end() &&
+ priority->second ==
+ LeAudioOffloadAudioProvider::CODEC_PRIORITY_DISABLED) {
return false;
+ }
return cfg_codec == req_codec;
}
@@ -222,8 +225,8 @@
CodecSpecificConfigurationLtv::OctetsPerCodecFrame& cfg_octets,
CodecSpecificCapabilitiesLtv::SupportedOctetsPerCodecFrame&
capability_octets) {
- return cfg_octets.value >= capability_octets.minimum &&
- cfg_octets.value <= capability_octets.maximum;
+ return cfg_octets.value >= capability_octets.min &&
+ cfg_octets.value <= capability_octets.max;
}
bool LeAudioOffloadAudioProvider::isCapabilitiesMatchedCodecConfiguration(
@@ -568,7 +571,7 @@
for (auto& setting : ase_configuration_settings) {
// Context matching
- if (setting.audioContext != in_qosRequirement.contextType) continue;
+ if (setting.audioContext != in_qosRequirement.audioContext) continue;
// Match configuration flags
// Currently configuration flags are not populated, ignore.
diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
index 85bc48a..7b98634 100644
--- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
@@ -2302,8 +2302,8 @@
frame_duration.bitmask =
CodecSpecificCapabilitiesLtv::SupportedFrameDurations::US7500;
auto octets = CodecSpecificCapabilitiesLtv::SupportedOctetsPerCodecFrame();
- octets.minimum = 0;
- octets.maximum = 60;
+ octets.min = 0;
+ octets.max = 60;
auto frames = CodecSpecificCapabilitiesLtv::SupportedMaxCodecFramesPerSDU();
frames.value = 2;
capability.codecSpecificCapabilities = {sampling_rate, frame_duration,
@@ -2567,7 +2567,7 @@
std::vector<IBluetoothAudioProvider::LeAudioAseQosConfiguration>
QoSConfigurations;
for (auto bitmask : all_context_bitmasks) {
- requirement.contextType = GetAudioContext(bitmask);
+ requirement.audioContext = GetAudioContext(bitmask);
IBluetoothAudioProvider::LeAudioAseQosConfigurationPair result;
auto aidl_retval =
audio_provider_->getLeAudioAseQosConfiguration(requirement, &result);
@@ -2590,8 +2590,8 @@
bool is_supported = false;
for (auto bitmask : all_context_bitmasks) {
- sink_requirement.context = GetAudioContext(bitmask);
- source_requirement.context = GetAudioContext(bitmask);
+ sink_requirement.audioContext = GetAudioContext(bitmask);
+ source_requirement.audioContext = GetAudioContext(bitmask);
IBluetoothAudioProvider::LeAudioDataPathConfigurationPair result;
auto aidl_retval = audio_provider_->getLeAudioAseDatapathConfiguration(
sink_requirement, source_requirement, &result);
diff --git a/bluetooth/finder/aidl/default/service.cpp b/bluetooth/finder/aidl/default/service.cpp
index a117df8..fe8904b 100644
--- a/bluetooth/finder/aidl/default/service.cpp
+++ b/bluetooth/finder/aidl/default/service.cpp
@@ -35,12 +35,16 @@
ndk::SharedRefBase::make<BluetoothFinder>();
std::string instance =
std::string() + BluetoothFinder::descriptor + "/default";
- auto result =
- AServiceManager_addService(service->asBinder().get(), instance.c_str());
- if (result == STATUS_OK) {
- ABinderProcess_joinThreadPool();
+ if (AServiceManager_isDeclared(instance.c_str())) {
+ auto result =
+ AServiceManager_addService(service->asBinder().get(), instance.c_str());
+ if (result != STATUS_OK) {
+ ALOGE("Could not register as a service!");
+ }
} else {
- ALOGE("Could not register as a service!");
+ ALOGE("Could not register as a service because it's not declared.");
}
+ // Keep running
+ ABinderProcess_joinThreadPool();
return 0;
}
diff --git a/bluetooth/lmp_event/aidl/default/src/main.rs b/bluetooth/lmp_event/aidl/default/src/main.rs
index cbdd4d1..dfb097f 100644
--- a/bluetooth/lmp_event/aidl/default/src/main.rs
+++ b/bluetooth/lmp_event/aidl/default/src/main.rs
@@ -41,10 +41,11 @@
let lmp_event_service = lmp_event::LmpEvent::new();
let lmp_event_service_binder = BnBluetoothLmpEvent::new_binder(lmp_event_service, BinderFeatures::default());
- binder::add_service(
- &format!("{}/default", lmp_event::LmpEvent::get_descriptor()),
- lmp_event_service_binder.as_binder(),
- ).expect("Failed to register service");
-
+ let descriptor = format!("{}/default", lmp_event::LmpEvent::get_descriptor());
+ if binder::is_declared(&descriptor).expect("Failed to check if declared") {
+ binder::add_service(&descriptor, lmp_event_service_binder.as_binder()).expect("Failed to register service");
+ } else {
+ info!("{LOG_TAG}: Failed to register service. Not declared.");
+ }
binder::ProcessState::join_thread_pool()
}
diff --git a/bluetooth/ranging/aidl/default/service.cpp b/bluetooth/ranging/aidl/default/service.cpp
index 83e539e..35a3f55 100644
--- a/bluetooth/ranging/aidl/default/service.cpp
+++ b/bluetooth/ranging/aidl/default/service.cpp
@@ -37,12 +37,16 @@
ndk::SharedRefBase::make<BluetoothChannelSounding>();
std::string instance =
std::string() + BluetoothChannelSounding::descriptor + "/default";
- auto result =
- AServiceManager_addService(service->asBinder().get(), instance.c_str());
- if (result == STATUS_OK) {
- ABinderProcess_joinThreadPool();
+ if (AServiceManager_isDeclared(instance.c_str())) {
+ auto result =
+ AServiceManager_addService(service->asBinder().get(), instance.c_str());
+ if (result != STATUS_OK) {
+ ALOGE("Could not register as a service!");
+ }
} else {
- ALOGE("Could not register as a service!");
+ ALOGE("Could not register as a service because it's not declared.");
}
+ // Keep running
+ ABinderProcess_joinThreadPool();
return 0;
}
diff --git a/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp b/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp
index a370436..8e85a1b 100644
--- a/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp
+++ b/broadcastradio/aidl/default/test/DefaultBroadcastRadioHalTest.cpp
@@ -14,10 +14,13 @@
* limitations under the License.
*/
+#include "MockBroadcastRadioCallback.h"
+
#include <BroadcastRadio.h>
#include <VirtualRadio.h>
#include <broadcastradio-utils-aidl/Utils.h>
+#include <android-base/logging.h>
#include <gtest/gtest.h>
namespace aidl::android::hardware::broadcastradio {
@@ -69,15 +72,53 @@
return amFmRadioMockTestRadio;
}
+int getSignalAcquisitionFlags(const ProgramInfo& info) {
+ return (info.infoFlags &
+ (ProgramInfo::FLAG_SIGNAL_ACQUISITION | ProgramInfo::FLAG_HD_SIS_ACQUISITION |
+ ProgramInfo::FLAG_HD_AUDIO_ACQUISITION)) >>
+ 6;
+}
+
} // namespace
class DefaultBroadcastRadioHalTest : public testing::Test {
public:
void SetUp() override {
+ ::android::base::SetDefaultTag("BcRadioAidlDef.test");
const VirtualRadio& amFmRadioMockTest = getAmFmMockTestRadio();
mBroadcastRadioHal = ::ndk::SharedRefBase::make<BroadcastRadio>(amFmRadioMockTest);
+ mTunerCallback = ndk::SharedRefBase::make<MockBroadcastRadioCallback>();
}
+
+ void TearDown() override {
+ mBroadcastRadioHal->unsetTunerCallback();
+ EXPECT_FALSE(mTunerCallback->isTunerFailed());
+ }
+
+ void verifyUpdatedProgramInfo(const ProgramSelector& sel) {
+ ASSERT_TRUE(mTunerCallback->waitOnCurrentProgramInfoChangedCallback());
+ ProgramInfo infoCb1 = mTunerCallback->getCurrentProgramInfo();
+ mTunerCallback->reset();
+ if (sel.primaryId.type == IdentifierType::HD_STATION_ID_EXT) {
+ EXPECT_TRUE(mTunerCallback->waitOnCurrentProgramInfoChangedCallback());
+ ProgramInfo infoCb2 = mTunerCallback->getCurrentProgramInfo();
+ mTunerCallback->reset();
+ EXPECT_TRUE(mTunerCallback->waitOnCurrentProgramInfoChangedCallback());
+ ProgramInfo infoCb3 = mTunerCallback->getCurrentProgramInfo();
+ mTunerCallback->reset();
+ EXPECT_EQ(infoCb1.selector, sel);
+ EXPECT_EQ(getSignalAcquisitionFlags(infoCb1), 0b001);
+ EXPECT_EQ(infoCb2.selector, sel);
+ EXPECT_EQ(getSignalAcquisitionFlags(infoCb2), 0b011);
+ EXPECT_EQ(infoCb3.selector, sel);
+ EXPECT_EQ(getSignalAcquisitionFlags(infoCb3), 0b111);
+ } else {
+ EXPECT_EQ(infoCb1.selector, sel);
+ }
+ }
+
std::shared_ptr<BroadcastRadio> mBroadcastRadioHal;
+ std::shared_ptr<MockBroadcastRadioCallback> mTunerCallback;
};
TEST_F(DefaultBroadcastRadioHalTest, GetAmFmRegionConfig) {
@@ -136,4 +177,73 @@
}
}
+TEST_F(DefaultBroadcastRadioHalTest, SetTunerCallback) {
+ auto halResult = mBroadcastRadioHal->setTunerCallback(mTunerCallback);
+
+ ASSERT_TRUE(halResult.isOk());
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, SetTunerCallbackWithNull) {
+ auto halResult = mBroadcastRadioHal->setTunerCallback(nullptr);
+
+ ASSERT_EQ(halResult.getServiceSpecificError(), utils::resultToInt(Result::INVALID_ARGUMENTS));
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, UnsetTunerCallbackWithNull) {
+ ASSERT_TRUE(mBroadcastRadioHal->setTunerCallback(mTunerCallback).isOk());
+
+ auto halResult = mBroadcastRadioHal->unsetTunerCallback();
+
+ ASSERT_TRUE(halResult.isOk());
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, TuneWithAmFmSelectorInProgramList) {
+ ASSERT_TRUE(mBroadcastRadioHal->setTunerCallback(mTunerCallback).isOk());
+ mTunerCallback->reset();
+
+ auto halResult = mBroadcastRadioHal->tune(kFmSel1);
+
+ ASSERT_TRUE(halResult.isOk());
+ ASSERT_TRUE(mTunerCallback->waitOnCurrentProgramInfoChangedCallback());
+ ProgramInfo infoCb = mTunerCallback->getCurrentProgramInfo();
+ EXPECT_EQ(infoCb.selector, kFmSel1);
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, TuneWithHdSelectorInProgramList) {
+ ASSERT_TRUE(mBroadcastRadioHal->setTunerCallback(mTunerCallback).isOk());
+ mTunerCallback->reset();
+
+ auto halResult = mBroadcastRadioHal->tune(kFmHdFreq1Sel2);
+
+ ASSERT_TRUE(halResult.isOk());
+ verifyUpdatedProgramInfo(kFmHdFreq1Sel2);
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, TuneWitFrequencyOfHdProgramInProgramList) {
+ ASSERT_TRUE(mBroadcastRadioHal->setTunerCallback(mTunerCallback).isOk());
+ mTunerCallback->reset();
+
+ auto halResult = mBroadcastRadioHal->tune(
+ utils::makeSelectorAmfm(utils::getHdFrequency(kFmHdFreq1Sel1)));
+
+ ASSERT_TRUE(halResult.isOk());
+ verifyUpdatedProgramInfo(kFmHdFreq1Sel1);
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, TuneWithInvalidSelector) {
+ ASSERT_TRUE(mBroadcastRadioHal->setTunerCallback(mTunerCallback).isOk());
+ ProgramSelector invalidSelector = {utils::makeIdentifier(IdentifierType::AMFM_FREQUENCY_KHZ, 0),
+ {}};
+
+ auto halResult = mBroadcastRadioHal->tune(invalidSelector);
+
+ ASSERT_EQ(halResult.getServiceSpecificError(), utils::resultToInt(Result::INVALID_ARGUMENTS));
+}
+
+TEST_F(DefaultBroadcastRadioHalTest, TuneWithoutTunerCallback) {
+ auto halResult = mBroadcastRadioHal->tune(kFmSel1);
+
+ ASSERT_EQ(halResult.getServiceSpecificError(), utils::resultToInt(Result::INVALID_STATE));
+}
+
} // namespace aidl::android::hardware::broadcastradio
diff --git a/broadcastradio/aidl/default/test/MockBroadcastRadioCallback.cpp b/broadcastradio/aidl/default/test/MockBroadcastRadioCallback.cpp
new file mode 100644
index 0000000..48f65fc
--- /dev/null
+++ b/broadcastradio/aidl/default/test/MockBroadcastRadioCallback.cpp
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+#include "MockBroadcastRadioCallback.h"
+
+#include <android-base/logging.h>
+
+namespace aidl::android::hardware::broadcastradio {
+
+namespace {
+using std::vector;
+}
+
+MockBroadcastRadioCallback::MockBroadcastRadioCallback() {
+ mAntennaConnectionState = true;
+}
+
+ScopedAStatus MockBroadcastRadioCallback::onTuneFailed(Result result,
+ const ProgramSelector& selector) {
+ LOG(DEBUG) << "onTuneFailed with result with " << selector.toString().c_str();
+ if (result != Result::CANCELED) {
+ std::lock_guard<std::mutex> lk(mLock);
+ tunerFailed = true;
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus MockBroadcastRadioCallback::onCurrentProgramInfoChanged(const ProgramInfo& info) {
+ LOG(DEBUG) << "onCurrentProgramInfoChanged with " << info.toString().c_str();
+ {
+ std::lock_guard<std::mutex> lk(mLock);
+ mCurrentProgramInfo = info;
+ }
+
+ mOnCurrentProgramInfoChangedFlag.notify();
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus MockBroadcastRadioCallback::onProgramListUpdated(
+ [[maybe_unused]] const ProgramListChunk& chunk) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus MockBroadcastRadioCallback::onParametersUpdated(
+ [[maybe_unused]] const vector<VendorKeyValue>& parameters) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus MockBroadcastRadioCallback::onAntennaStateChange(bool connected) {
+ if (!connected) {
+ std::lock_guard<std::mutex> lk(mLock);
+ mAntennaConnectionState = false;
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus MockBroadcastRadioCallback::onConfigFlagUpdated([[maybe_unused]] ConfigFlag in_flag,
+ [[maybe_unused]] bool in_value) {
+ return ndk::ScopedAStatus::ok();
+}
+
+bool MockBroadcastRadioCallback::waitOnCurrentProgramInfoChangedCallback() {
+ return mOnCurrentProgramInfoChangedFlag.wait();
+}
+
+void MockBroadcastRadioCallback::reset() {
+ mOnCurrentProgramInfoChangedFlag.reset();
+}
+
+bool MockBroadcastRadioCallback::isTunerFailed() {
+ std::lock_guard<std::mutex> lk(mLock);
+ return tunerFailed;
+}
+
+ProgramInfo MockBroadcastRadioCallback::getCurrentProgramInfo() {
+ std::lock_guard<std::mutex> lk(mLock);
+ return mCurrentProgramInfo;
+}
+
+} // namespace aidl::android::hardware::broadcastradio
diff --git a/broadcastradio/aidl/default/test/MockBroadcastRadioCallback.h b/broadcastradio/aidl/default/test/MockBroadcastRadioCallback.h
new file mode 100644
index 0000000..2ae03e3
--- /dev/null
+++ b/broadcastradio/aidl/default/test/MockBroadcastRadioCallback.h
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#include <aidl/android/hardware/broadcastradio/BnTunerCallback.h>
+#include <aidl/android/hardware/broadcastradio/ConfigFlag.h>
+#include <aidl/android/hardware/broadcastradio/IBroadcastRadio.h>
+#include <aidl/android/hardware/broadcastradio/ProgramInfo.h>
+#include <aidl/android/hardware/broadcastradio/ProgramListChunk.h>
+#include <aidl/android/hardware/broadcastradio/ProgramSelector.h>
+#include <aidl/android/hardware/broadcastradio/Result.h>
+#include <aidl/android/hardware/broadcastradio/VendorKeyValue.h>
+
+#include <android-base/thread_annotations.h>
+
+#include <broadcastradio-utils-aidl/Utils.h>
+
+#include <condition_variable>
+
+namespace aidl::android::hardware::broadcastradio {
+
+namespace {
+using ::ndk::ScopedAStatus;
+
+} // namespace
+
+class MockBroadcastRadioCallback final : public BnTunerCallback {
+ public:
+ explicit MockBroadcastRadioCallback();
+ ScopedAStatus onTuneFailed(Result result, const ProgramSelector& selector) override;
+ ScopedAStatus onCurrentProgramInfoChanged(const ProgramInfo& info) override;
+ ScopedAStatus onProgramListUpdated(const ProgramListChunk& chunk) override;
+ ScopedAStatus onParametersUpdated(const std::vector<VendorKeyValue>& parameters) override;
+ ScopedAStatus onAntennaStateChange(bool connected) override;
+ ScopedAStatus onConfigFlagUpdated(ConfigFlag in_flag, bool in_value) override;
+
+ bool waitOnCurrentProgramInfoChangedCallback();
+ bool isTunerFailed();
+ void reset();
+
+ ProgramInfo getCurrentProgramInfo();
+
+ private:
+ class CallbackFlag final {
+ public:
+ CallbackFlag(int timeoutMs) { mTimeoutMs = timeoutMs; }
+ /**
+ * Notify that the callback is called.
+ */
+ void notify() {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCalled = true;
+ lock.unlock();
+ mCv.notify_all();
+ };
+
+ /**
+ * Wait for the timeout passed into the constructor.
+ */
+ bool wait() {
+ std::unique_lock<std::mutex> lock(mMutex);
+ return mCv.wait_for(lock, std::chrono::milliseconds(mTimeoutMs),
+ [this] { return mCalled; });
+ };
+
+ /**
+ * Reset the callback to not called.
+ */
+ void reset() {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCalled = false;
+ }
+
+ private:
+ std::mutex mMutex;
+ bool mCalled GUARDED_BY(mMutex) = false;
+ std::condition_variable mCv;
+ int mTimeoutMs;
+ };
+
+ std::mutex mLock;
+ bool mAntennaConnectionState GUARDED_BY(mLock);
+ bool tunerFailed GUARDED_BY(mLock) = false;
+ ProgramInfo mCurrentProgramInfo GUARDED_BY(mLock);
+ utils::ProgramInfoSet mProgramList GUARDED_BY(mLock);
+ CallbackFlag mOnCurrentProgramInfoChangedFlag = CallbackFlag(IBroadcastRadio::TUNER_TIMEOUT_MS);
+};
+
+} // namespace aidl::android::hardware::broadcastradio
diff --git a/broadcastradio/common/utilsaidl/test/BroadcastRadioUtilsTest.cpp b/broadcastradio/common/utilsaidl/test/BroadcastRadioUtilsTest.cpp
index b115f75..87223e8 100644
--- a/broadcastradio/common/utilsaidl/test/BroadcastRadioUtilsTest.cpp
+++ b/broadcastradio/common/utilsaidl/test/BroadcastRadioUtilsTest.cpp
@@ -66,6 +66,177 @@
.bandResult = utils::FrequencyBand::UNKNOWN}});
}
+struct IsValidIdentifierTestCase {
+ std::string name;
+ ProgramIdentifier id;
+ bool valid;
+};
+
+std::vector<IsValidIdentifierTestCase> getIsValidIdentifierTestCases() {
+ return std::vector<IsValidIdentifierTestCase>({
+ IsValidIdentifierTestCase{.name = "invalid_id_type",
+ .id = utils::makeIdentifier(IdentifierType::INVALID, 0),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_frequency_high",
+ .id = utils::makeIdentifier(IdentifierType::DAB_FREQUENCY_KHZ, 10000000u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_frequency_low",
+ .id = utils::makeIdentifier(IdentifierType::DAB_FREQUENCY_KHZ, 100000u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "valid_dab_frequency",
+ .id = utils::makeIdentifier(IdentifierType::DAB_FREQUENCY_KHZ, 1000000u),
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "invalid_am_fm_frequency_high",
+ .id = utils::makeIdentifier(IdentifierType::AMFM_FREQUENCY_KHZ, 10000000u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_am_fm_frequency_low",
+ .id = utils::makeIdentifier(IdentifierType::AMFM_FREQUENCY_KHZ, 100u),
+ .valid = false},
+ IsValidIdentifierTestCase{.name = "valid_am_fm_frequency",
+ .id = utils::makeIdentifier(
+ IdentifierType::AMFM_FREQUENCY_KHZ, kFmFrequencyKHz),
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "drmo_frequency_high",
+ .id = utils::makeIdentifier(IdentifierType::DRMO_FREQUENCY_KHZ, 10000000u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "drmo_frequency_low",
+ .id = utils::makeIdentifier(IdentifierType::DRMO_FREQUENCY_KHZ, 100u),
+ .valid = false},
+ IsValidIdentifierTestCase{.name = "valid_drmo_frequency",
+ .id = utils::makeIdentifier(
+ IdentifierType::DRMO_FREQUENCY_KHZ, kFmFrequencyKHz),
+ .valid = true},
+ IsValidIdentifierTestCase{.name = "invalid_rds_low",
+ .id = utils::makeIdentifier(IdentifierType::RDS_PI, 0x0),
+ .valid = false},
+ IsValidIdentifierTestCase{.name = "invalid_rds_high",
+ .id = utils::makeIdentifier(IdentifierType::RDS_PI, 0x10000),
+ .valid = false},
+ IsValidIdentifierTestCase{.name = "valid_rds",
+ .id = utils::makeIdentifier(IdentifierType::RDS_PI, 0x1000),
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "invalid_hd_id_zero",
+ .id = utils::makeSelectorHd(/* stationId= */ 0u, kHdSubChannel, kHdFrequency)
+ .primaryId,
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_hd_suchannel",
+ .id = utils::makeSelectorHd(kHdStationId, /* subChannel= */ 8u, kHdFrequency)
+ .primaryId,
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_hd_frequency_low",
+ .id = utils::makeSelectorHd(kHdStationId, kHdSubChannel, /* frequency= */ 100u)
+ .primaryId,
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "valid_hd_id",
+ .id = utils::makeSelectorHd(kHdStationId, kHdSubChannel, kHdFrequency)
+ .primaryId,
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "invalid_hd_station_name",
+ .id = utils::makeIdentifier(IdentifierType::HD_STATION_NAME, 0x41422D464D),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "valid_hd_station_name",
+ .id = utils::makeIdentifier(IdentifierType::HD_STATION_NAME, 0x414231464D),
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_sid",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SID_EXT, 0x0E100000000u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_ecc_low",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SID_EXT, 0x0F700000221u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_ecc_high",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SID_EXT, 0x09900000221u),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "valid_dab_sid_ext",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SID_EXT, kDabSidExt),
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_ensemble_zero",
+ .id = utils::makeIdentifier(IdentifierType::DAB_ENSEMBLE, 0x0),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_dab_ensemble_high",
+ .id = utils::makeIdentifier(IdentifierType::DAB_ENSEMBLE, 0x10000),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "valid_dab_ensemble",
+ .id = utils::makeIdentifier(IdentifierType::DAB_ENSEMBLE, kDabEnsemble),
+ .valid = true},
+ IsValidIdentifierTestCase{.name = "invalid_dab_scid_low",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SCID, 0xF),
+ .valid = false},
+ IsValidIdentifierTestCase{.name = "invalid_dab_scid_high",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SCID, 0x1000),
+ .valid = false},
+ IsValidIdentifierTestCase{.name = "valid_dab_scid",
+ .id = utils::makeIdentifier(IdentifierType::DAB_SCID, 0x100),
+ .valid = true},
+ IsValidIdentifierTestCase{
+ .name = "invalid_drmo_id_zero",
+ .id = utils::makeIdentifier(IdentifierType::DRMO_SERVICE_ID, 0x0),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "invalid_drmo_id_high",
+ .id = utils::makeIdentifier(IdentifierType::DRMO_SERVICE_ID, 0x1000000),
+ .valid = false},
+ IsValidIdentifierTestCase{
+ .name = "valid_drmo_id",
+ .id = utils::makeIdentifier(IdentifierType::DRMO_SERVICE_ID, 0x100000),
+ .valid = true},
+ });
+}
+
+struct IsValidSelectorTestCase {
+ std::string name;
+ ProgramSelector sel;
+ bool valid;
+};
+
+std::vector<IsValidSelectorTestCase> getIsValidSelectorTestCases() {
+ return std::vector<IsValidSelectorTestCase>({
+ IsValidSelectorTestCase{.name = "valid_am_fm_selector",
+ .sel = utils::makeSelectorAmfm(kFmFrequencyKHz),
+ .valid = true},
+ IsValidSelectorTestCase{
+ .name = "valid_hd_selector",
+ .sel = utils::makeSelectorHd(kHdStationId, kHdSubChannel, kHdFrequency),
+ .valid = true},
+ IsValidSelectorTestCase{
+ .name = "valid_dab_selector",
+ .sel = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz),
+ .valid = true},
+ IsValidSelectorTestCase{.name = "valid_rds_selector",
+ .sel = ProgramSelector{.primaryId = utils::makeIdentifier(
+ IdentifierType::RDS_PI, 0x1000)},
+ .valid = true},
+ IsValidSelectorTestCase{.name = "selector_with_invalid_id",
+ .sel = utils::makeSelectorHd(kHdStationId, kHdSubChannel,
+ /* frequency= */ 100u),
+ .valid = false},
+ IsValidSelectorTestCase{
+ .name = "selector_with_invalid_primary_id_type",
+ .sel = ProgramSelector{.primaryId = utils::makeIdentifier(
+ IdentifierType::DAB_ENSEMBLE, kDabEnsemble)},
+ .valid = false},
+ });
+}
+
struct IsValidMetadataTestCase {
std::string name;
Metadata metadata;
@@ -147,6 +318,34 @@
ASSERT_EQ(utils::isValidMetadata(testParam.metadata), testParam.valid);
}
+class IsValidIdentifierTest : public testing::TestWithParam<IsValidIdentifierTestCase> {};
+
+INSTANTIATE_TEST_SUITE_P(IsValidIdentifierTests, IsValidIdentifierTest,
+ testing::ValuesIn(getIsValidIdentifierTestCases()),
+ [](const testing::TestParamInfo<IsValidIdentifierTest::ParamType>& info) {
+ return info.param.name;
+ });
+
+TEST_P(IsValidIdentifierTest, IsValid) {
+ IsValidIdentifierTestCase testcase = GetParam();
+
+ ASSERT_EQ(utils::isValid(testcase.id), testcase.valid);
+}
+
+class IsValidSelectorTest : public testing::TestWithParam<IsValidSelectorTestCase> {};
+
+INSTANTIATE_TEST_SUITE_P(IsValidSelectorTests, IsValidSelectorTest,
+ testing::ValuesIn(getIsValidSelectorTestCases()),
+ [](const testing::TestParamInfo<IsValidSelectorTest::ParamType>& info) {
+ return info.param.name;
+ });
+
+TEST_P(IsValidSelectorTest, IsValid) {
+ IsValidSelectorTestCase testcase = GetParam();
+
+ ASSERT_EQ(utils::isValid(testcase.sel), testcase.valid);
+}
+
TEST(BroadcastRadioUtilsTest, IsSupportedWithSupportedSelector) {
ProgramSelector sel = utils::makeSelectorAmfm(kFmFrequencyKHz);
@@ -355,6 +554,70 @@
ASSERT_EQ(utils::getDabSCIdS(sel), kDabSCIdS);
}
+TEST(BroadcastRadioUtilsTest, TunesToWithTheSameHdSelector) {
+ ProgramSelector sel = utils::makeSelectorHd(kHdStationId, kHdSubChannel, kHdFrequency);
+ ProgramSelector selTarget = utils::makeSelectorHd(kHdStationId, kHdSubChannel, kHdFrequency);
+
+ ASSERT_TRUE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToAmFmSelectorWithDifferentSubChannels) {
+ ProgramSelector sel = utils::makeSelectorHd(kHdStationId, kHdSubChannel, kHdFrequency);
+ ProgramSelector selTarget = utils::makeSelectorAmfm(kHdFrequency);
+
+ ASSERT_FALSE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToMainHdChannelWithDifferentSubChannels) {
+ ProgramSelector sel = utils::makeSelectorAmfm(kHdFrequency);
+ ProgramSelector selTarget =
+ utils::makeSelectorHd(kHdStationId, /* subChannel= */ 0, kHdFrequency);
+
+ ASSERT_TRUE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToWithTheSameAmFmSelector) {
+ ProgramSelector sel = utils::makeSelectorAmfm(kFmFrequencyKHz);
+ ProgramSelector selTarget = utils::makeSelectorAmfm(kFmFrequencyKHz);
+
+ ASSERT_TRUE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToWithDifferentFrequencies) {
+ ProgramSelector sel = utils::makeSelectorAmfm(kFmFrequencyKHz);
+ ProgramSelector selTarget = utils::makeSelectorAmfm(kFmFrequencyKHz + 200);
+
+ ASSERT_FALSE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToWithTheSameDabSelector) {
+ ProgramSelector sel = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz);
+ ProgramSelector selTarget = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz);
+
+ ASSERT_TRUE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToWithDabSelectorOfDifferentPrimaryIds) {
+ ProgramSelector sel = utils::makeSelectorDab(kDabSidExt + 1, kDabEnsemble, kDabFrequencyKhz);
+ ProgramSelector selTarget = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz);
+
+ ASSERT_FALSE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToWithDabSelectorOfDifferentSecondayIds) {
+ ProgramSelector sel = utils::makeSelectorDab(kDabSidExt, kDabEnsemble + 100, kDabFrequencyKhz);
+ ProgramSelector selTarget = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz);
+
+ ASSERT_FALSE(utils::tunesTo(sel, selTarget));
+}
+
+TEST(BroadcastRadioUtilsTest, TunesToWithDabSelectorWithoutSecondaryIds) {
+ ProgramSelector sel = utils::makeSelectorDab(kDabSidExt);
+ ProgramSelector selTarget = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz);
+
+ ASSERT_TRUE(utils::tunesTo(sel, selTarget));
+}
+
TEST(BroadcastRadioUtilsTest, SatisfiesWithSatisfiedIdTypesFilter) {
ProgramFilter filter = ProgramFilter{.identifierTypes = {IdentifierType::DAB_FREQUENCY_KHZ}};
ProgramSelector sel = utils::makeSelectorDab(kDabSidExt, kDabEnsemble, kDabFrequencyKhz);
diff --git a/camera/device/aidl/android/hardware/camera/device/ICameraDeviceSession.aidl b/camera/device/aidl/android/hardware/camera/device/ICameraDeviceSession.aidl
index ffc1a11..62a19cf 100644
--- a/camera/device/aidl/android/hardware/camera/device/ICameraDeviceSession.aidl
+++ b/camera/device/aidl/android/hardware/camera/device/ICameraDeviceSession.aidl
@@ -89,12 +89,12 @@
* with processCaptureResult (and its respective releaseFence has been
* signaled) the framework may free or reuse it at any time.
*
- * This method wil only be called by the framework if
+ * This method must only be called by the framework if
* ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION is either not advertised or is
* ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_AIDL. If the value of
* ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION is
* ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_SESSION_CONFIGURABLE, configureStreamsV2
- * will be called instead.
+ * must be called instead.
*
* ------------------------------------------------------------------------
*
diff --git a/camera/device/default/ExternalCameraDeviceSession.cpp b/camera/device/default/ExternalCameraDeviceSession.cpp
index a6ec4c7..a16dd7f 100644
--- a/camera/device/default/ExternalCameraDeviceSession.cpp
+++ b/camera/device/default/ExternalCameraDeviceSession.cpp
@@ -789,8 +789,10 @@
outputBuffer.bufferId = buffer.bufferId;
outputBuffer.status = BufferStatus::ERROR;
if (buffer.acquireFence >= 0) {
- outputBuffer.releaseFence.fds.resize(1);
- outputBuffer.releaseFence.fds.at(0).set(buffer.acquireFence);
+ native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
+ handle->data[0] = buffer.acquireFence;
+ outputBuffer.releaseFence = android::dupToAidl(handle);
+ native_handle_delete(handle);
}
} else {
offlineBuffers.push_back(buffer);
@@ -1389,12 +1391,14 @@
// All buffers are imported. Now validate output buffer acquire fences
for (size_t i = 0; i < numOutputBufs; i++) {
- if (!sHandleImporter.importFence(
- ::android::makeFromAidl(request.outputBuffers[i].acquireFence), allFences[i])) {
+ native_handle_t* h = ::android::makeFromAidl(request.outputBuffers[i].acquireFence);
+ if (!sHandleImporter.importFence(h, allFences[i])) {
ALOGE("%s: output buffer %zu acquire fence is invalid", __FUNCTION__, i);
cleanupInflightFences(allFences, i);
+ native_handle_delete(h);
return Status::INTERNAL_ERROR;
}
+ native_handle_delete(h);
}
return Status::OK;
}
@@ -1768,8 +1772,10 @@
result.outputBuffers[i].bufferId = req->buffers[i].bufferId;
result.outputBuffers[i].status = BufferStatus::ERROR;
if (req->buffers[i].acquireFence >= 0) {
- result.outputBuffers[i].releaseFence.fds.resize(1);
- result.outputBuffers[i].releaseFence.fds.at(0).set(req->buffers[i].acquireFence);
+ native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
+ handle->data[0] = req->buffers[i].acquireFence;
+ result.outputBuffers[i].releaseFence = android::dupToAidl(handle);
+ native_handle_delete(handle);
}
}
@@ -1813,16 +1819,20 @@
if (req->buffers[i].fenceTimeout) {
result.outputBuffers[i].status = BufferStatus::ERROR;
if (req->buffers[i].acquireFence >= 0) {
- result.outputBuffers[i].releaseFence.fds.resize(1);
- result.outputBuffers[i].releaseFence.fds.at(0).set(req->buffers[i].acquireFence);
+ native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
+ handle->data[0] = req->buffers[i].acquireFence;
+ result.outputBuffers[i].releaseFence = android::dupToAidl(handle);
+ native_handle_delete(handle);
}
notifyError(req->frameNumber, req->buffers[i].streamId, ErrorCode::ERROR_BUFFER);
} else {
result.outputBuffers[i].status = BufferStatus::OK;
// TODO: refactor
if (req->buffers[i].acquireFence >= 0) {
- result.outputBuffers[i].releaseFence.fds.resize(1);
- result.outputBuffers[i].releaseFence.fds.at(0).set(req->buffers[i].acquireFence);
+ native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
+ handle->data[0] = req->buffers[i].acquireFence;
+ result.outputBuffers[i].releaseFence = android::dupToAidl(handle);
+ native_handle_delete(handle);
}
}
}
@@ -2086,9 +2096,10 @@
// TODO: create a batch import API so we don't need to lock/unlock mCbsLock
// repeatedly?
lk.unlock();
- Status s =
- parent->importBuffer(streamId, hBuf.bufferId, makeFromAidl(hBuf.buffer),
- /*out*/ &mBufferReqs[i].bufPtr);
+ native_handle_t* h = makeFromAidl(hBuf.buffer);
+ Status s = parent->importBuffer(streamId, hBuf.bufferId, h,
+ /*out*/ &mBufferReqs[i].bufPtr);
+ native_handle_delete(h);
lk.lock();
if (s != Status::OK) {
@@ -2096,12 +2107,14 @@
cleanupInflightFences(importedFences, i - 1);
return false;
}
- if (!sHandleImporter.importFence(makeFromAidl(hBuf.acquireFence),
- mBufferReqs[i].acquireFence)) {
+ h = makeFromAidl(hBuf.acquireFence);
+ if (!sHandleImporter.importFence(h, mBufferReqs[i].acquireFence)) {
ALOGE("%s: stream %d import fence failed!", __FUNCTION__, streamId);
cleanupInflightFences(importedFences, i - 1);
+ native_handle_delete(h);
return false;
}
+ native_handle_delete(h);
importedFences[i] = mBufferReqs[i].acquireFence;
} break;
default:
diff --git a/camera/device/default/ExternalCameraOfflineSession.cpp b/camera/device/default/ExternalCameraOfflineSession.cpp
index 53bd44f..2d4e2e0 100644
--- a/camera/device/default/ExternalCameraOfflineSession.cpp
+++ b/camera/device/default/ExternalCameraOfflineSession.cpp
@@ -110,7 +110,8 @@
if (req->buffers[i].acquireFence >= 0) {
native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
handle->data[0] = req->buffers[i].acquireFence;
- result.outputBuffers[i].releaseFence = android::makeToAidl(handle);
+ result.outputBuffers[i].releaseFence = android::dupToAidl(handle);
+ native_handle_delete(handle);
}
notifyError(req->frameNumber, req->buffers[i].streamId, ErrorCode::ERROR_BUFFER);
} else {
@@ -119,7 +120,8 @@
if (req->buffers[i].acquireFence >= 0) {
native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
handle->data[0] = req->buffers[i].acquireFence;
- outputBuffer.releaseFence = android::makeToAidl(handle);
+ outputBuffer.releaseFence = android::dupToAidl(handle);
+ native_handle_delete(handle);
}
}
}
@@ -247,7 +249,8 @@
if (req->buffers[i].acquireFence >= 0) {
native_handle_t* handle = native_handle_create(/*numFds*/ 1, /*numInts*/ 0);
handle->data[0] = req->buffers[i].acquireFence;
- outputBuffer.releaseFence = makeToAidl(handle);
+ outputBuffer.releaseFence = dupToAidl(handle);
+ native_handle_delete(handle);
}
}
diff --git a/camera/device/default/ExternalCameraUtils.cpp b/camera/device/default/ExternalCameraUtils.cpp
index 30c216f..2dc3c77 100644
--- a/camera/device/default/ExternalCameraUtils.cpp
+++ b/camera/device/default/ExternalCameraUtils.cpp
@@ -750,18 +750,12 @@
void freeReleaseFences(std::vector<CaptureResult>& results) {
for (auto& result : results) {
- native_handle_t* inputReleaseFence =
- ::android::makeFromAidl(result.inputBuffer.releaseFence);
- if (inputReleaseFence != nullptr) {
- native_handle_close(inputReleaseFence);
- native_handle_delete(inputReleaseFence);
- }
+ // NativeHandles free fd's on desctruction. Simply delete the objects!
+ result.inputBuffer.releaseFence.fds.clear(); // Implicitly closes fds
+ result.inputBuffer.releaseFence.ints.clear();
for (auto& buf : result.outputBuffers) {
- native_handle_t* outReleaseFence = ::android::makeFromAidl(buf.releaseFence);
- if (outReleaseFence != nullptr) {
- native_handle_close(outReleaseFence);
- native_handle_delete(outReleaseFence);
- }
+ buf.releaseFence.fds.clear(); // Implicitly closes fds
+ buf.releaseFence.ints.clear();
}
}
}
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLensFacing.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLensFacing.aidl
index 8cd2229..19822fc 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLensFacing.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLensFacing.aidl
@@ -25,6 +25,7 @@
/**
* android.automotive.lens.facing enumeration values
* @see ANDROID_AUTOMOTIVE_LENS_FACING
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLocation.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLocation.aidl
index 0ef64b4..6c3edbe 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLocation.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/AutomotiveLocation.aidl
@@ -25,6 +25,7 @@
/**
* android.automotive.location enumeration values
* @see ANDROID_AUTOMOTIVE_LOCATION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/BlackLevelLock.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/BlackLevelLock.aidl
index 4746cf3..8d3443a 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/BlackLevelLock.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/BlackLevelLock.aidl
@@ -25,6 +25,7 @@
/**
* android.blackLevel.lock enumeration values
* @see ANDROID_BLACK_LEVEL_LOCK
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl
index 890ac0e..a0f6c83 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl
@@ -25,6 +25,7 @@
/**
* android.colorCorrection.aberrationMode enumeration values
* @see ANDROID_COLOR_CORRECTION_ABERRATION_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl
index 080ca02..2a51bfc 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl
@@ -25,6 +25,7 @@
/**
* android.colorCorrection.mode enumeration values
* @see ANDROID_COLOR_CORRECTION_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl
index 8a2f501..47f7ebf 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.aeAntibandingMode enumeration values
* @see ANDROID_CONTROL_AE_ANTIBANDING_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLock.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLock.aidl
index ab56fdc..e226ac0 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLock.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLock.aidl
@@ -25,6 +25,7 @@
/**
* android.control.aeLock enumeration values
* @see ANDROID_CONTROL_AE_LOCK
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLockAvailable.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLockAvailable.aidl
index b846fc1..a62cd27 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLockAvailable.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeLockAvailable.aidl
@@ -25,6 +25,7 @@
/**
* android.control.aeLockAvailable enumeration values
* @see ANDROID_CONTROL_AE_LOCK_AVAILABLE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeMode.aidl
index 70174be..9f7aaae 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.aeMode enumeration values
* @see ANDROID_CONTROL_AE_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl
index 2229712..5275cd1 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl
@@ -25,6 +25,7 @@
/**
* android.control.aePrecaptureTrigger enumeration values
* @see ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeState.aidl
index af8c2cf..ffdf7d4 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAeState.aidl
@@ -25,6 +25,7 @@
/**
* android.control.aeState enumeration values
* @see ANDROID_CONTROL_AE_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfMode.aidl
index 344f2de..cff3a25 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.afMode enumeration values
* @see ANDROID_CONTROL_AF_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfSceneChange.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfSceneChange.aidl
index 153611a..dce31de 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfSceneChange.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfSceneChange.aidl
@@ -25,6 +25,7 @@
/**
* android.control.afSceneChange enumeration values
* @see ANDROID_CONTROL_AF_SCENE_CHANGE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfState.aidl
index 2c8d602..cbdc28f 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfState.aidl
@@ -25,6 +25,7 @@
/**
* android.control.afState enumeration values
* @see ANDROID_CONTROL_AF_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfTrigger.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfTrigger.aidl
index b68d4c7..0c82b25 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfTrigger.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAfTrigger.aidl
@@ -25,6 +25,7 @@
/**
* android.control.afTrigger enumeration values
* @see ANDROID_CONTROL_AF_TRIGGER
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl
index 0fef373..ba18491 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframing.aidl
@@ -25,6 +25,7 @@
/**
* android.control.autoframing enumeration values
* @see ANDROID_CONTROL_AUTOFRAMING
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl
index da0d348..fd45647 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl
@@ -25,6 +25,7 @@
/**
* android.control.autoframingAvailable enumeration values
* @see ANDROID_CONTROL_AUTOFRAMING_AVAILABLE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl
index 13183a5..9ac200a 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAutoframingState.aidl
@@ -25,6 +25,7 @@
/**
* android.control.autoframingState enumeration values
* @see ANDROID_CONTROL_AUTOFRAMING_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLock.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLock.aidl
index f7229f2..a1e6a79 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLock.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLock.aidl
@@ -25,6 +25,7 @@
/**
* android.control.awbLock enumeration values
* @see ANDROID_CONTROL_AWB_LOCK
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl
index 0cb6ebe..4a69f87 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl
@@ -25,6 +25,7 @@
/**
* android.control.awbLockAvailable enumeration values
* @see ANDROID_CONTROL_AWB_LOCK_AVAILABLE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbMode.aidl
index 2f9b801..043841a 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.awbMode enumeration values
* @see ANDROID_CONTROL_AWB_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbState.aidl
index 1a93191..835d299 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAwbState.aidl
@@ -25,6 +25,7 @@
/**
* android.control.awbState enumeration values
* @see ANDROID_CONTROL_AWB_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlCaptureIntent.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlCaptureIntent.aidl
index 132d98c..1cd5467 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlCaptureIntent.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlCaptureIntent.aidl
@@ -25,6 +25,7 @@
/**
* android.control.captureIntent enumeration values
* @see ANDROID_CONTROL_CAPTURE_INTENT
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlEffectMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlEffectMode.aidl
index 1668cb3..f4586c2 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlEffectMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlEffectMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.effectMode enumeration values
* @see ANDROID_CONTROL_EFFECT_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlEnableZsl.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlEnableZsl.aidl
index a83c051..6fffa5e 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlEnableZsl.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlEnableZsl.aidl
@@ -25,6 +25,7 @@
/**
* android.control.enableZsl enumeration values
* @see ANDROID_CONTROL_ENABLE_ZSL
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl
index 2fe66cf..b95a4f5 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.extendedSceneMode enumeration values
* @see ANDROID_CONTROL_EXTENDED_SCENE_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlLowLightBoostState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlLowLightBoostState.aidl
index 67591c8..19be8fc 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlLowLightBoostState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlLowLightBoostState.aidl
@@ -25,6 +25,7 @@
/**
* android.control.lowLightBoostState enumeration values
* @see ANDROID_CONTROL_LOW_LIGHT_BOOST_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlMode.aidl
index d9ab9ab..b964d45 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.mode enumeration values
* @see ANDROID_CONTROL_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlSceneMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlSceneMode.aidl
index 0f90aaa..f5c0a4a 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlSceneMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlSceneMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.sceneMode enumeration values
* @see ANDROID_CONTROL_SCENE_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlSettingsOverride.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlSettingsOverride.aidl
index d97f7c8..d0ee992 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlSettingsOverride.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlSettingsOverride.aidl
@@ -25,6 +25,7 @@
/**
* android.control.settingsOverride enumeration values
* @see ANDROID_CONTROL_SETTINGS_OVERRIDE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl
index 497846c..94cc626 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl
@@ -25,6 +25,7 @@
/**
* android.control.videoStabilizationMode enumeration values
* @see ANDROID_CONTROL_VIDEO_STABILIZATION_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DemosaicMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DemosaicMode.aidl
index 7d8cdcf..0c389aa 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DemosaicMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DemosaicMode.aidl
@@ -25,6 +25,7 @@
/**
* android.demosaic.mode enumeration values
* @see ANDROID_DEMOSAIC_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl
index 7deb350..3cc882b 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.depth.availableDepthStreamConfigurations enumeration values
* @see ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl
index 5d06be1..658f3bb 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl
@@ -25,6 +25,7 @@
/**
* android.depth.availableDepthStreamConfigurationsMaximumResolution enumeration values
* @see ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl
index 39a99b9..1ec3d11 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.depth.availableDynamicDepthStreamConfigurations enumeration values
* @see ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl
index 30ea9b7..b0ad00e 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl
@@ -25,6 +25,7 @@
/**
* android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution enumeration values
* @see ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl
index 4af81d9..de31b41 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl
@@ -25,6 +25,7 @@
/**
* android.depth.depthIsExclusive enumeration values
* @see ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/DistortionCorrectionMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/DistortionCorrectionMode.aidl
index 3456207..fbf7abb 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/DistortionCorrectionMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/DistortionCorrectionMode.aidl
@@ -25,6 +25,7 @@
/**
* android.distortionCorrection.mode enumeration values
* @see ANDROID_DISTORTION_CORRECTION_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/EdgeMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/EdgeMode.aidl
index 1e15523..81bd04c 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/EdgeMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/EdgeMode.aidl
@@ -25,6 +25,7 @@
/**
* android.edge.mode enumeration values
* @see ANDROID_EDGE_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/FlashInfoAvailable.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/FlashInfoAvailable.aidl
index 0528037..b938d82 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/FlashInfoAvailable.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/FlashInfoAvailable.aidl
@@ -25,6 +25,7 @@
/**
* android.flash.info.available enumeration values
* @see ANDROID_FLASH_INFO_AVAILABLE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/FlashMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/FlashMode.aidl
index e175596..b279c44 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/FlashMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/FlashMode.aidl
@@ -25,6 +25,7 @@
/**
* android.flash.mode enumeration values
* @see ANDROID_FLASH_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/FlashState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/FlashState.aidl
index fc398f8..b029566 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/FlashState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/FlashState.aidl
@@ -25,6 +25,7 @@
/**
* android.flash.state enumeration values
* @see ANDROID_FLASH_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl
index fc9b6ec..c31cfba 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.heic.availableHeicStreamConfigurations enumeration values
* @see ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl
index 13b50ab..bf5d92e 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl
@@ -25,6 +25,7 @@
/**
* android.heic.availableHeicStreamConfigurationsMaximumResolution enumeration values
* @see ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/HeicInfoSupported.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/HeicInfoSupported.aidl
index c4e04f1..88825e6 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/HeicInfoSupported.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/HeicInfoSupported.aidl
@@ -25,6 +25,7 @@
/**
* android.heic.info.supported enumeration values
* @see ANDROID_HEIC_INFO_SUPPORTED
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/HotPixelMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/HotPixelMode.aidl
index 7b7aa21..bd99569 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/HotPixelMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/HotPixelMode.aidl
@@ -25,6 +25,7 @@
/**
* android.hotPixel.mode enumeration values
* @see ANDROID_HOT_PIXEL_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl
index 964d079..a84f3cc 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl
@@ -25,6 +25,7 @@
/**
* android.info.supportedBufferManagementVersion enumeration values
* @see ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl
index f242009..0ea6287 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl
@@ -25,6 +25,7 @@
/**
* android.info.supportedHardwareLevel enumeration values
* @see ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl
index 911a062..834ed5d 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.jpegr.availableJpegRStreamConfigurations enumeration values
* @see ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl
index 9e78662..eb0d847 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl
@@ -25,6 +25,7 @@
/**
* android.jpegr.availableJpegRStreamConfigurationsMaximumResolution enumeration values
* @see ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LedAvailableLeds.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LedAvailableLeds.aidl
index f26fcde..ba564c4 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LedAvailableLeds.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LedAvailableLeds.aidl
@@ -25,6 +25,7 @@
/**
* android.led.availableLeds enumeration values
* @see ANDROID_LED_AVAILABLE_LEDS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LedTransmit.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LedTransmit.aidl
index 62c9bd7..f8b40ca 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LedTransmit.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LedTransmit.aidl
@@ -25,6 +25,7 @@
/**
* android.led.transmit enumeration values
* @see ANDROID_LED_TRANSMIT
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LensFacing.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LensFacing.aidl
index 0677ea9..fa9cb14 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LensFacing.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LensFacing.aidl
@@ -25,6 +25,7 @@
/**
* android.lens.facing enumeration values
* @see ANDROID_LENS_FACING
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl
index 1c82bb0..2060e97 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl
@@ -25,6 +25,7 @@
/**
* android.lens.info.focusDistanceCalibration enumeration values
* @see ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl
index e350e15..03f8711 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl
@@ -25,6 +25,7 @@
/**
* android.lens.opticalStabilizationMode enumeration values
* @see ANDROID_LENS_OPTICAL_STABILIZATION_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LensPoseReference.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LensPoseReference.aidl
index 3e6034b..124c670 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LensPoseReference.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LensPoseReference.aidl
@@ -25,6 +25,7 @@
/**
* android.lens.poseReference enumeration values
* @see ANDROID_LENS_POSE_REFERENCE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LensState.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LensState.aidl
index 0e5a04c..216bfb1 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LensState.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LensState.aidl
@@ -25,6 +25,7 @@
/**
* android.lens.state enumeration values
* @see ANDROID_LENS_STATE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl
index 623a15c..ee6a1a0 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl
@@ -25,6 +25,7 @@
/**
* android.logicalMultiCamera.sensorSyncType enumeration values
* @see ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/NoiseReductionMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/NoiseReductionMode.aidl
index 947361d..7303512 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/NoiseReductionMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/NoiseReductionMode.aidl
@@ -25,6 +25,7 @@
/**
* android.noiseReduction.mode enumeration values
* @see ANDROID_NOISE_REDUCTION_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/QuirksPartialResult.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/QuirksPartialResult.aidl
index 15a79b0..3af9f85 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/QuirksPartialResult.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/QuirksPartialResult.aidl
@@ -25,6 +25,7 @@
/**
* android.quirks.partialResult enumeration values
* @see ANDROID_QUIRKS_PARTIAL_RESULT
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl
index ebe0b4c..a8e5fe0 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl
@@ -25,6 +25,7 @@
/**
* android.request.availableCapabilities enumeration values
* @see ANDROID_REQUEST_AVAILABLE_CAPABILITIES
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
index b397dea..ee36480 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
@@ -25,6 +25,7 @@
/**
* android.request.availableColorSpaceProfilesMap enumeration values
* @see ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="long")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
index f04fae3..d7598d6 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
@@ -25,6 +25,7 @@
/**
* android.request.availableDynamicRangeProfilesMap enumeration values
* @see ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="long")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestMetadataMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestMetadataMode.aidl
index 37d4095..d526393 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestMetadataMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestMetadataMode.aidl
@@ -25,6 +25,7 @@
/**
* android.request.metadataMode enumeration values
* @see ANDROID_REQUEST_METADATA_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestType.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestType.aidl
index 5010a37..a8c97cb 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestType.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestType.aidl
@@ -25,6 +25,7 @@
/**
* android.request.type enumeration values
* @see ANDROID_REQUEST_TYPE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableFormats.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableFormats.aidl
index a8e67bb..fb42654 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableFormats.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableFormats.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.availableFormats enumeration values
* @see ANDROID_SCALER_AVAILABLE_FORMATS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl
index 57c3989..7498abf 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.availableRecommendedStreamConfigurations enumeration values
* @see ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl
index 2b493ae..66599ae 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.availableStreamConfigurations enumeration values
* @see ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl
index 4f6cb5e..ec9c5db 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.availableStreamConfigurationsMaximumResolution enumeration values
* @see ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl
index da27a48..eed16fa 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.availableStreamUseCases enumeration values
* @see ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="long")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerCroppingType.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerCroppingType.aidl
index e44eff1..bf3672d 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerCroppingType.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerCroppingType.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.croppingType enumeration values
* @see ANDROID_SCALER_CROPPING_TYPE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl
index f7cbc0f..d75aa7d 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.multiResolutionStreamSupported enumeration values
* @see ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl
index 9427854..c725572 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.physicalCameraMultiResolutionStreamConfigurations enumeration values
* @see ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl
index 9050153..b49dec0 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl
@@ -25,6 +25,7 @@
/**
* android.scaler.rotateAndCrop enumeration values
* @see ANDROID_SCALER_ROTATE_AND_CROP
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl
index 59a4038..1d8190c 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.info.colorFilterArrangement enumeration values
* @see ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl
index 8892ad3..c5169af 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.info.lensShadingApplied enumeration values
* @see ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl
index 2a5860b..de65ef7 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.info.timestampSource enumeration values
* @see ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorPixelMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorPixelMode.aidl
index 3dda07b..a76e479 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorPixelMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorPixelMode.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.pixelMode enumeration values
* @see ANDROID_SENSOR_PIXEL_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl
index 20e92e4..8b421ba 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.rawBinningFactorUsed enumeration values
* @see ANDROID_SENSOR_RAW_BINNING_FACTOR_USED
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl
index 1678515..f5ab369 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 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.
@@ -25,6 +25,7 @@
/**
* android.sensor.readoutTimestamp enumeration values
* @see ANDROID_SENSOR_READOUT_TIMESTAMP
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorReferenceIlluminant1.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorReferenceIlluminant1.aidl
index c8c9216..a0a3a40 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorReferenceIlluminant1.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorReferenceIlluminant1.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.referenceIlluminant1 enumeration values
* @see ANDROID_SENSOR_REFERENCE_ILLUMINANT1
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SensorTestPatternMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SensorTestPatternMode.aidl
index 29aede4..4ad0503 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SensorTestPatternMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SensorTestPatternMode.aidl
@@ -25,6 +25,7 @@
/**
* android.sensor.testPatternMode enumeration values
* @see ANDROID_SENSOR_TEST_PATTERN_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ShadingMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ShadingMode.aidl
index 6939b72..2080195 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ShadingMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ShadingMode.aidl
@@ -25,6 +25,7 @@
/**
* android.shading.mode enumeration values
* @see ANDROID_SHADING_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl
index 0d17791..55d79cd 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.faceDetectMode enumeration values
* @see ANDROID_STATISTICS_FACE_DETECT_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHistogramMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHistogramMode.aidl
index a9b6f68..de1cfee 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHistogramMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHistogramMode.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.histogramMode enumeration values
* @see ANDROID_STATISTICS_HISTOGRAM_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl
index 286291a..b81a7cd 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.hotPixelMapMode enumeration values
* @see ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl
index d21b222..3a91c71 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.lensShadingMapMode enumeration values
* @see ANDROID_STATISTICS_LENS_SHADING_MAP_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsOisDataMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsOisDataMode.aidl
index afb281f..42801ed 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsOisDataMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsOisDataMode.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.oisDataMode enumeration values
* @see ANDROID_STATISTICS_OIS_DATA_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl
index da2402af..371e9fb 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.sceneFlicker enumeration values
* @see ANDROID_STATISTICS_SCENE_FLICKER
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl
index ed6c65c..487e8ac 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl
@@ -25,6 +25,7 @@
/**
* android.statistics.sharpnessMapMode enumeration values
* @see ANDROID_STATISTICS_SHARPNESS_MAP_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SyncFrameNumber.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SyncFrameNumber.aidl
index e33319e..148718d 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SyncFrameNumber.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SyncFrameNumber.aidl
@@ -25,6 +25,7 @@
/**
* android.sync.frameNumber enumeration values
* @see ANDROID_SYNC_FRAME_NUMBER
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/SyncMaxLatency.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/SyncMaxLatency.aidl
index cb0668f..7df4ff0 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/SyncMaxLatency.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/SyncMaxLatency.aidl
@@ -25,6 +25,7 @@
/**
* android.sync.maxLatency enumeration values
* @see ANDROID_SYNC_MAX_LATENCY
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/TonemapMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/TonemapMode.aidl
index d4b7e0eb..ed53060 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/TonemapMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/TonemapMode.aidl
@@ -25,6 +25,7 @@
/**
* android.tonemap.mode enumeration values
* @see ANDROID_TONEMAP_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/TonemapPresetCurve.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/TonemapPresetCurve.aidl
index 2da3704..c6fed00 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/TonemapPresetCurve.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/TonemapPresetCurve.aidl
@@ -25,6 +25,7 @@
/**
* android.tonemap.presetCurve enumeration values
* @see ANDROID_TONEMAP_PRESET_CURVE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
*/
@VintfStability
@Backing(type="int")
diff --git a/health/OWNERS b/health/OWNERS
index 1d4d086..e540d55 100644
--- a/health/OWNERS
+++ b/health/OWNERS
@@ -1,6 +1,6 @@
# Bug component: 30545
apelosi@google.com
-elsk@google.com
+dvander@google.com
smoreland@google.com
wjack@google.com
diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp
index 6df623a..37662ea 100644
--- a/health/aidl/default/Health.cpp
+++ b/health/aidl/default/Health.cpp
@@ -36,6 +36,11 @@
LinkedCallback* linked = reinterpret_cast<LinkedCallback*>(cookie);
linked->OnCallbackDied();
}
+// Delete the owned cookie.
+void onCallbackUnlinked(void* cookie) {
+ LinkedCallback* linked = reinterpret_cast<LinkedCallback*>(cookie);
+ delete linked;
+}
} // namespace
/*
@@ -57,6 +62,7 @@
: instance_name_(instance_name),
healthd_config_(std::move(config)),
death_recipient_(AIBinder_DeathRecipient_new(&OnCallbackDiedWrapped)) {
+ AIBinder_DeathRecipient_setOnUnlinked(death_recipient_.get(), onCallbackUnlinked);
battery_monitor_.init(healthd_config_.get());
}
@@ -254,15 +260,6 @@
return healthd_config_->screen_on(&props);
}
-namespace {
-bool IsDeadObjectLogged(const ndk::ScopedAStatus& ret) {
- if (ret.isOk()) return false;
- if (ret.getStatus() == ::STATUS_DEAD_OBJECT) return true;
- LOG(ERROR) << "Cannot call healthInfoChanged on callback: " << ret.getDescription();
- return false;
-}
-} // namespace
-
//
// Subclass helpers / overrides
//
@@ -295,7 +292,7 @@
if (!linked_callback_result.ok()) {
return ndk::ScopedAStatus::fromStatus(-linked_callback_result.error().code());
}
- callbacks_.emplace_back(std::move(*linked_callback_result));
+ callbacks_[*linked_callback_result] = callback;
// unlock
}
@@ -306,8 +303,10 @@
return ndk::ScopedAStatus::ok();
}
- if (auto res = callback->healthInfoChanged(health_info); IsDeadObjectLogged(res)) {
- (void)unregisterCallback(callback);
+ auto res = callback->healthInfoChanged(health_info);
+ if (!res.isOk()) {
+ LOG(DEBUG) << "Cannot call healthInfoChanged:" << res.getDescription()
+ << ". Do nothing here if callback is dead as it will be cleaned up later.";
}
return ndk::ScopedAStatus::ok();
}
@@ -321,12 +320,24 @@
std::lock_guard<decltype(callbacks_lock_)> lock(callbacks_lock_);
- auto matches = [callback](const auto& linked) {
- return linked->callback()->asBinder() == callback->asBinder(); // compares binder object
+ auto matches = [callback](const auto& cb) {
+ return cb->asBinder() == callback->asBinder(); // compares binder object
};
- auto it = std::remove_if(callbacks_.begin(), callbacks_.end(), matches);
- bool removed = (it != callbacks_.end());
- callbacks_.erase(it, callbacks_.end()); // calls unlinkToDeath on deleted callbacks.
+ bool removed = false;
+ for (auto it = callbacks_.begin(); it != callbacks_.end();) {
+ if (it->second->asBinder() == callback->asBinder()) {
+ auto status = AIBinder_unlinkToDeath(callback->asBinder().get(), death_recipient_.get(),
+ reinterpret_cast<void*>(it->first));
+ if (status != STATUS_OK && status != STATUS_DEAD_OBJECT) {
+ LOG(WARNING) << __func__
+ << "Cannot unlink to death: " << ::android::statusToString(status);
+ }
+ it = callbacks_.erase(it);
+ removed = true;
+ } else {
+ it++;
+ }
+ }
return removed ? ndk::ScopedAStatus::ok()
: ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
@@ -354,13 +365,13 @@
void Health::OnHealthInfoChanged(const HealthInfo& health_info) {
// Notify all callbacks
std::unique_lock<decltype(callbacks_lock_)> lock(callbacks_lock_);
- // is_dead notifies a callback and return true if it is dead.
- auto is_dead = [&](const auto& linked) {
- auto res = linked->callback()->healthInfoChanged(health_info);
- return IsDeadObjectLogged(res);
- };
- auto it = std::remove_if(callbacks_.begin(), callbacks_.end(), is_dead);
- callbacks_.erase(it, callbacks_.end()); // calls unlinkToDeath on deleted callbacks.
+ for (const auto& [_, callback] : callbacks_) {
+ auto res = callback->healthInfoChanged(health_info);
+ if (!res.isOk()) {
+ LOG(DEBUG) << "Cannot call healthInfoChanged:" << res.getDescription()
+ << ". Do nothing here if callback is dead as it will be cleaned up later.";
+ }
+ }
lock.unlock();
// Let HalHealthLoop::OnHealthInfoChanged() adjusts uevent / wakealarm periods
diff --git a/health/aidl/default/LinkedCallback.cpp b/health/aidl/default/LinkedCallback.cpp
index 26e99f9..df471a3 100644
--- a/health/aidl/default/LinkedCallback.cpp
+++ b/health/aidl/default/LinkedCallback.cpp
@@ -24,35 +24,24 @@
namespace aidl::android::hardware::health {
-::android::base::Result<std::unique_ptr<LinkedCallback>> LinkedCallback::Make(
+::android::base::Result<LinkedCallback*> LinkedCallback::Make(
std::shared_ptr<Health> service, std::shared_ptr<IHealthInfoCallback> callback) {
- std::unique_ptr<LinkedCallback> ret(new LinkedCallback());
+ LinkedCallback* ret(new LinkedCallback());
+ // pass ownership of this object to the death recipient
binder_status_t linkRet =
AIBinder_linkToDeath(callback->asBinder().get(), service->death_recipient_.get(),
- reinterpret_cast<void*>(ret.get()));
+ reinterpret_cast<void*>(ret));
if (linkRet != ::STATUS_OK) {
LOG(WARNING) << __func__ << "Cannot link to death: " << linkRet;
return ::android::base::Error(-linkRet);
}
ret->service_ = service;
- ret->callback_ = std::move(callback);
+ ret->callback_ = callback;
return ret;
}
LinkedCallback::LinkedCallback() = default;
-LinkedCallback::~LinkedCallback() {
- if (callback_ == nullptr) {
- return;
- }
- auto status =
- AIBinder_unlinkToDeath(callback_->asBinder().get(), service()->death_recipient_.get(),
- reinterpret_cast<void*>(this));
- if (status != STATUS_OK && status != STATUS_DEAD_OBJECT) {
- LOG(WARNING) << __func__ << "Cannot unlink to death: " << ::android::statusToString(status);
- }
-}
-
std::shared_ptr<Health> LinkedCallback::service() {
auto service_sp = service_.lock();
CHECK_NE(nullptr, service_sp);
@@ -60,7 +49,10 @@
}
void LinkedCallback::OnCallbackDied() {
- service()->unregisterCallback(callback_);
+ auto sCb = callback_.lock();
+ if (sCb) {
+ service()->unregisterCallback(sCb);
+ }
}
} // namespace aidl::android::hardware::health
diff --git a/health/aidl/default/LinkedCallback.h b/health/aidl/default/LinkedCallback.h
index da494c9..8c9c997 100644
--- a/health/aidl/default/LinkedCallback.h
+++ b/health/aidl/default/LinkedCallback.h
@@ -32,19 +32,10 @@
class LinkedCallback {
public:
// Automatically linkToDeath upon construction with the returned object as the cookie.
- // service->death_reciepient() should be from CreateDeathRecipient().
- // Not using a strong reference to |service| to avoid circular reference. The lifetime
- // of |service| must be longer than this LinkedCallback object.
- static ::android::base::Result<std::unique_ptr<LinkedCallback>> Make(
+ // The deathRecipient owns the LinkedCallback object and will delete it with
+ // cookie when it's unlinked.
+ static ::android::base::Result<LinkedCallback*> Make(
std::shared_ptr<Health> service, std::shared_ptr<IHealthInfoCallback> callback);
-
- // Automatically unlinkToDeath upon destruction. So, it is always safe to reinterpret_cast
- // the cookie back to the LinkedCallback object.
- ~LinkedCallback();
-
- // The wrapped IHealthInfoCallback object.
- const std::shared_ptr<IHealthInfoCallback>& callback() const { return callback_; }
-
// On callback died, unreigster it from the service.
void OnCallbackDied();
@@ -55,7 +46,7 @@
std::shared_ptr<Health> service();
std::weak_ptr<Health> service_;
- std::shared_ptr<IHealthInfoCallback> callback_;
+ std::weak_ptr<IHealthInfoCallback> callback_;
};
} // namespace aidl::android::hardware::health
diff --git a/health/aidl/default/include/health-impl/Health.h b/health/aidl/default/include/health-impl/Health.h
index dc3a0ef..429ae2a 100644
--- a/health/aidl/default/include/health-impl/Health.h
+++ b/health/aidl/default/include/health-impl/Health.h
@@ -16,6 +16,7 @@
#pragma once
+#include <map>
#include <memory>
#include <optional>
@@ -112,7 +113,7 @@
ndk::ScopedAIBinder_DeathRecipient death_recipient_;
int binder_fd_ = -1;
std::mutex callbacks_lock_;
- std::vector<std::unique_ptr<LinkedCallback>> callbacks_;
+ std::map<LinkedCallback*, std::shared_ptr<IHealthInfoCallback>> callbacks_;
};
} // namespace aidl::android::hardware::health
diff --git a/media/bufferpool/aidl/aidl_api/android.hardware.media.bufferpool2/current/android/hardware/media/bufferpool2/IClientManager.aidl b/media/bufferpool/aidl/aidl_api/android.hardware.media.bufferpool2/current/android/hardware/media/bufferpool2/IClientManager.aidl
index 5899a40..298cb13 100644
--- a/media/bufferpool/aidl/aidl_api/android.hardware.media.bufferpool2/current/android/hardware/media/bufferpool2/IClientManager.aidl
+++ b/media/bufferpool/aidl/aidl_api/android.hardware.media.bufferpool2/current/android/hardware/media/bufferpool2/IClientManager.aidl
@@ -35,6 +35,7 @@
@VintfStability
interface IClientManager {
android.hardware.media.bufferpool2.IClientManager.Registration registerSender(in android.hardware.media.bufferpool2.IAccessor bufferPool);
+ android.hardware.media.bufferpool2.IClientManager.Registration registerPassiveSender(in android.hardware.media.bufferpool2.IAccessor bufferPool);
@VintfStability
parcelable Registration {
long connectionId;
diff --git a/media/bufferpool/aidl/android/hardware/media/bufferpool2/IClientManager.aidl b/media/bufferpool/aidl/android/hardware/media/bufferpool2/IClientManager.aidl
index a3054cb..2bc77bc 100644
--- a/media/bufferpool/aidl/android/hardware/media/bufferpool2/IClientManager.aidl
+++ b/media/bufferpool/aidl/android/hardware/media/bufferpool2/IClientManager.aidl
@@ -40,7 +40,8 @@
/**
* Sets up a buffer receiving communication node for the specified
* buffer pool. A manager must create a IConnection to the buffer
- * pool if it does not already have a connection.
+ * pool if it does not already have a connection. To transfer buffers
+ * using the interface, the sender must initiates transfer.
*
* @param bufferPool a buffer pool which is specified with the IAccessor.
* The specified buffer pool is the owner of received buffers.
@@ -52,4 +53,21 @@
* ResultStatus::CRITICAL_ERROR - Other errors.
*/
Registration registerSender(in IAccessor bufferPool);
+
+ /**
+ * Sets up a buffer receiving communication node for the specified
+ * buffer pool. A manager must create a IConnection to the buffer
+ * pool if it does not already have a connection. To transfer buffers
+ * using the interface, the receiver must initiates transfer(on demand).
+ *
+ * @param bufferPool a buffer pool which is specified with the IAccessor.
+ * The specified buffer pool is the owner of received buffers.
+ * @return the Id of the communication node to the buffer pool.
+ * This id is used in FMQ to notify IAccessor that a buffer has been
+ * sent to that connection during transfers.
+ * @throws ServiceSpecificException with one of the following values:
+ * ResultStatus::NO_MEMORY - Memory allocation failure occurred.
+ * ResultStatus::CRITICAL_ERROR - Other errors.
+ */
+ Registration registerPassiveSender(in IAccessor bufferPool);
}
diff --git a/media/bufferpool/aidl/default/ClientManager.cpp b/media/bufferpool/aidl/default/ClientManager.cpp
index de1db50..138790d 100644
--- a/media/bufferpool/aidl/default/ClientManager.cpp
+++ b/media/bufferpool/aidl/default/ClientManager.cpp
@@ -422,6 +422,14 @@
return ::ndk::ScopedAStatus::ok();
}
+::ndk::ScopedAStatus ClientManager::registerPassiveSender(
+ const std::shared_ptr<IAccessor>& in_bufferPool, Registration* _aidl_return) {
+ // TODO
+ (void) in_bufferPool;
+ (void) _aidl_return;
+ return ::ndk::ScopedAStatus::fromServiceSpecificError(ResultStatus::NOT_FOUND);
+}
+
// Methods for local use.
std::shared_ptr<ClientManager> ClientManager::sInstance;
std::mutex ClientManager::sInstanceLock;
diff --git a/media/bufferpool/aidl/default/include/bufferpool2/ClientManager.h b/media/bufferpool/aidl/default/include/bufferpool2/ClientManager.h
index bff75ba..4b0916f 100644
--- a/media/bufferpool/aidl/default/include/bufferpool2/ClientManager.h
+++ b/media/bufferpool/aidl/default/include/bufferpool2/ClientManager.h
@@ -34,6 +34,11 @@
::aidl::android::hardware::media::bufferpool2::IClientManager::Registration* _aidl_return)
override;
+ ::ndk::ScopedAStatus registerPassiveSender(
+ const std::shared_ptr<IAccessor>& in_bufferPool,
+ ::aidl::android::hardware::media::bufferpool2::IClientManager::Registration* _aidl_return)
+ override;
+
/** Gets an instance. */
static std::shared_ptr<ClientManager> getInstance();
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl
index 4439bc5..0a7e3c4 100644
--- a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl
@@ -51,12 +51,18 @@
long blockPoolId;
android.hardware.media.c2.IConfigurable configurable;
}
- parcelable C2AidlGbAllocator {
- android.hardware.media.c2.IGraphicBufferAllocator igba;
+ parcelable GbAllocator {
ParcelFileDescriptor waitableFd;
+ android.hardware.media.c2.IGraphicBufferAllocator igba;
}
- union BlockPoolAllocator {
+ parcelable PooledGbAllocator {
+ ParcelFileDescriptor waitableFd;
+ long receiverId;
+ android.hardware.media.c2.IPooledGraphicBufferAllocator ipgba;
+ }
+ parcelable BlockPoolAllocator {
int allocatorId;
- android.hardware.media.c2.IComponent.C2AidlGbAllocator allocator;
+ @nullable android.hardware.media.c2.IComponent.GbAllocator gbAllocator;
+ @nullable android.hardware.media.c2.IComponent.PooledGbAllocator pooledGbAllocator;
}
}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IPooledGraphicBufferAllocator.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IPooledGraphicBufferAllocator.aidl
new file mode 100644
index 0000000..1a8c66d
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IPooledGraphicBufferAllocator.aidl
@@ -0,0 +1,49 @@
+/*
+ * 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.media.c2;
+@VintfStability
+interface IPooledGraphicBufferAllocator {
+ android.hardware.media.c2.IPooledGraphicBufferAllocator.Allocation allocate(in android.hardware.media.c2.IPooledGraphicBufferAllocator.Description desc);
+ boolean deallocate(in int id);
+ parcelable Allocation {
+ int bufferId;
+ @nullable ParcelFileDescriptor fence;
+ }
+ parcelable Description {
+ int widthPixels;
+ int heightPixels;
+ int format;
+ long usage;
+ }
+}
diff --git a/media/c2/aidl/android/hardware/media/c2/IComponent.aidl b/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
index ed2eaf4..387d70a 100644
--- a/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
@@ -24,6 +24,7 @@
import android.hardware.media.c2.IInputSink;
import android.hardware.media.c2.IInputSurface;
import android.hardware.media.c2.IInputSurfaceConnection;
+import android.hardware.media.c2.IPooledGraphicBufferAllocator;
import android.hardware.media.c2.WorkBundle;
import android.os.ParcelFileDescriptor;
@@ -57,20 +58,36 @@
* graphic blocks. the waitable fd is used to create a specific type of
* C2Fence which can be used for waiting until to allocate is not blocked.
*/
- parcelable C2AidlGbAllocator {
- IGraphicBufferAllocator igba;
+ parcelable GbAllocator {
ParcelFileDescriptor waitableFd;
+ IGraphicBufferAllocator igba;
}
/**
+ * C2AIDL allocator interface based on media.bufferpool2 along with a waitable fd.
+ *
+ * The interface is used from a specific type of C2BlockPool to allocate
+ * graphic blocks. the waitable fd is used to create a specific type of
+ * C2Fence which can be used for waiting until to allocate is not blocked.
+ * receiverId is id of receiver IConnection of media.bufferpool2.
+ */
+ parcelable PooledGbAllocator {
+ ParcelFileDescriptor waitableFd;
+ long receiverId;
+ IPooledGraphicBufferAllocator ipgba;
+ }
+
+
+ /**
* Allocator for C2BlockPool.
*
* C2BlockPool will use a C2Allocator which is specified by an id.
- * or C2AIDL allocator interface directly.
+ * Based on allocator id, allocator is specified.
*/
- union BlockPoolAllocator {
+ parcelable BlockPoolAllocator {
int allocatorId;
- C2AidlGbAllocator allocator;
+ @nullable GbAllocator gbAllocator;
+ @nullable PooledGbAllocator pooledGbAllocator;
}
/**
diff --git a/media/c2/aidl/android/hardware/media/c2/IPooledGraphicBufferAllocator.aidl b/media/c2/aidl/android/hardware/media/c2/IPooledGraphicBufferAllocator.aidl
new file mode 100644
index 0000000..b599d52
--- /dev/null
+++ b/media/c2/aidl/android/hardware/media/c2/IPooledGraphicBufferAllocator.aidl
@@ -0,0 +1,77 @@
+/*
+ * 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.media.c2;
+
+import android.os.ParcelFileDescriptor;
+
+/**
+ * Interface for decoder output buffer allocator for HAL process
+ *
+ * A graphic buffer for decoder output is allocated by the interface.
+ */
+@VintfStability
+interface IPooledGraphicBufferAllocator {
+ /**
+ * A graphic buffer allocation.
+ *
+ * bufferId is id of buffer from a media.bufferpool2. The buffer is
+ * android.hardware.HardwareBuffer.
+ * fence is provided in order to signal readiness of the buffer I/O inside
+ * underlying Graphics subsystem. This is called a sync fence throughout Android framework.
+ */
+ parcelable Allocation {
+ int bufferId;
+ @nullable ParcelFileDescriptor fence;
+ }
+
+ /**
+ * Parameters for a graphic buffer allocation.
+ *
+ * Refer to AHardwareBuffer_Desc(libnativewindow) for details.
+ */
+ parcelable Description {
+ int widthPixels;
+ int heightPixels;
+ int format; // AHardwareBuffer_Format
+ long usage; // AHardwareBuffer_UsageFlags
+ }
+
+ /**
+ * Allocate a graphic buffer.
+ * deallocate() must be called after the allocated buffer is no longer needed.
+ *
+ * @param desc Allocation parameters.
+ * @return an id of a buffer, the id is created from media.bufferpool2 in order for
+ * caching and recycling,
+ * If underlying allocator is blocked, c2::Status::Blocked will be returned.
+ * Waitable fd must be obtained using the ndk object locally. The waitable fd must
+ * be passed to the receiver during BlockPool creation request via AIDL.
+ * @throws ServiceSpecificException with one of the following values:
+ * - `c2::Status::BAD_STATE` - The client is not in running states.
+ * - `c2::Status::BLOCKED` - Underlying graphics system is blocked.
+ * - `c2::Status::CORRUPTED` - Some unknown error occurred.
+ */
+ Allocation allocate(in Description desc);
+
+ /**
+ * De-allocate a graphic buffer by graphic buffer's unique id.
+ *
+ * @param id buffer id.
+ * @return {@code true} when de-allocate happened, {@code false} otherwise.
+ */
+ boolean deallocate(in int id);
+}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/ChannelMessage.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/ChannelMessage.aidl
index 25f01c0..ab38fcc 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/ChannelMessage.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/ChannelMessage.aidl
@@ -35,10 +35,11 @@
@FixedSize @VintfStability
parcelable ChannelMessage {
int sessionID;
+ long timeStampNanos;
android.hardware.power.ChannelMessage.ChannelMessageContents data;
@FixedSize @VintfStability
union ChannelMessageContents {
- int[20] tids = {(-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */, (-1) /* -1 */};
+ long[16] reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
long targetDuration;
android.hardware.power.SessionHint hint;
android.hardware.power.ChannelMessage.ChannelMessageContents.SessionModeSetter mode;
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDurationFixedV1.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDurationFixedV1.aidl
index 8cd246d..45310b8 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDurationFixedV1.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDurationFixedV1.aidl
@@ -34,7 +34,6 @@
package android.hardware.power;
@FixedSize @VintfStability
parcelable WorkDurationFixedV1 {
- long timeStampNanos;
long durationNanos;
long workPeriodStartTimestampNanos;
long cpuDurationNanos;
diff --git a/power/aidl/android/hardware/power/ChannelMessage.aidl b/power/aidl/android/hardware/power/ChannelMessage.aidl
index 4747d90..fa16911 100644
--- a/power/aidl/android/hardware/power/ChannelMessage.aidl
+++ b/power/aidl/android/hardware/power/ChannelMessage.aidl
@@ -38,6 +38,12 @@
int sessionID;
/**
+ * Timestamp in nanoseconds based on CLOCK_MONOTONIC when the message was sent,
+ * used to ensure all messages can be processed in a coherent order.
+ */
+ long timeStampNanos;
+
+ /**
* A union defining the different messages that can be passed through the
* channel. Each type corresponds to a different call in IPowerHintSession.
*/
@@ -47,12 +53,9 @@
@VintfStability
union ChannelMessageContents {
/**
- * List of TIDs for this session to change to. Can be used in cases
- * where HintManagerService is not needed to validate the TIDs, such as
- * when all TIDs directly belong to the process that owns the session.
+ * Reserves the maximum fixed size for the ChannelMessage.
*/
- int[20] tids = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
+ long[16] reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/**
* Setting this field will update the session’s target duration, equivalent
diff --git a/power/aidl/android/hardware/power/WorkDurationFixedV1.aidl b/power/aidl/android/hardware/power/WorkDurationFixedV1.aidl
index 2d202ff..ef5c755 100644
--- a/power/aidl/android/hardware/power/WorkDurationFixedV1.aidl
+++ b/power/aidl/android/hardware/power/WorkDurationFixedV1.aidl
@@ -20,12 +20,6 @@
@VintfStability
parcelable WorkDurationFixedV1 {
/**
- * Timestamp in nanoseconds based on CLOCK_MONOTONIC when the duration
- * sample was measured.
- */
- long timeStampNanos;
-
- /**
* Total work duration in nanoseconds.
*/
long durationNanos;
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index 38cb33b..e89f4ee 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -16,6 +16,7 @@
#include <android-base/logging.h>
#include <android/hardware/radio/1.2/IRadio.h>
+#include <gtest/gtest.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -72,11 +73,16 @@
CellIdentityTdscdma cit = cellIdentities.cellIdentityTdscdma[0];
hidl_mcc = cit.mcc;
hidl_mnc = cit.mnc;
- } else {
+ } else if (cellInfoType == CellInfoType::CDMA) {
// CellIndentityCdma has no mcc and mnc.
EXPECT_EQ(CellInfoType::CDMA, cellInfoType);
EXPECT_EQ(1, cellIdentities.cellIdentityCdma.size());
checkMccMnc = false;
+ } else {
+ // This test can be skipped for newer networks if a new RAT (e.g. 5g) that was not
+ // supported in this version is added to the response from a modem that supports a new
+ // version of this interface.
+ GTEST_SKIP() << "Exempt from 1.0 test: camped on a new network:" << (int)cellInfoType;
}
// Check only one CellIdentity is size 1, and others must be 0.
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index 2bce2f9..51ca967 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -807,11 +807,16 @@
cellIdentities.cellIdentityTdscdma[0];
hidl_mcc = cit.base.mcc;
hidl_mnc = cit.base.mnc;
- } else {
+ } else if (cellInfoType == CellInfoType::CDMA) {
// CellIndentityCdma has no mcc and mnc.
EXPECT_EQ(CellInfoType::CDMA, cellInfoType);
EXPECT_EQ(1, cellIdentities.cellIdentityCdma.size());
checkMccMnc = false;
+ } else {
+ // This test can be skipped for newer networks if a new RAT (e.g. 5g) that was not
+ // supported in this version is added to the response from a modem that supports a new
+ // version of this interface.
+ GTEST_SKIP() << "Exempt from 1.2 test: camped on a new network:" << (int)cellInfoType;
}
// Check only one CellIdentity is size 1, and others must be 0.
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpReceptionStats.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpReceptionStats.aidl
index 82b798b..216da4c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpReceptionStats.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpReceptionStats.aidl
@@ -35,8 +35,8 @@
@VintfStability
parcelable RtpReceptionStats {
int rtpTimestamp;
- int rtpSequenceNumber;
- int timeDurationMs;
+ int rtcpSrTimestamp;
+ long rtcpSrNtpTimestamp;
int jitterBufferMs;
int roundTripTimeMs;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ConnectionEvent.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ConnectionEvent.aidl
index eedb8ed..1529512 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ConnectionEvent.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ConnectionEvent.aidl
@@ -42,9 +42,13 @@
NAS_SIGNALLING_LTE = 4,
AS_SIGNALLING_LTE = 5,
VOLTE_SIP = 6,
- VOLTE_RTP = 7,
- NAS_SIGNALLING_5G = 8,
- AS_SIGNALLING_5G = 9,
- VONR_SIP = 10,
- VONR_RTP = 11,
+ VOLTE_SIP_SOS = 7,
+ VOLTE_RTP = 8,
+ VOLTE_RTP_SOS = 9,
+ NAS_SIGNALLING_5G = 10,
+ AS_SIGNALLING_5G = 11,
+ VONR_SIP = 12,
+ VONR_SIP_SOS = 13,
+ VONR_RTP = 14,
+ VONR_RTP_SOS = 15,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithm.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithm.aidl
index c590d2b..c3333bf 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithm.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithm.aidl
@@ -57,6 +57,7 @@
NEA1 = 56,
NEA2 = 57,
NEA3 = 58,
+ SIP_NO_IPSEC_CONFIG = 66,
IMS_NULL = 67,
SIP_NULL = 68,
AES_GCM = 69,
@@ -66,6 +67,7 @@
AES_EDE3_CBC = 73,
HMAC_SHA1_96 = 74,
HMAC_MD5_96 = 75,
+ RTP = 85,
SRTP_NULL = 86,
SRTP_AES_COUNTER = 87,
SRTP_AES_F8 = 88,
diff --git a/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl b/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl
index 0fe6740..69ca780 100644
--- a/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl
@@ -110,8 +110,7 @@
* Adjust the delay in the jitter buffer to synchronize the audio with the time of video
* frames
*
- * @param delayMs The delay to apply to the jitter buffer. If it is positive, the jitter
- * buffer increases the delay, if it is negative, the jitter buffer decreases the delay.
+ * @param delayMs The additional delay to the jitter buffer in milliseconds.
*
* This is available when android.hardware.telephony.ims is defined.
*/
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpReceptionStats.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpReceptionStats.aidl
index 1239d13..81c0bb2 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpReceptionStats.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpReceptionStats.aidl
@@ -20,12 +20,19 @@
parcelable RtpReceptionStats {
/** The timestamp of the latest RTP packet received */
int rtpTimestamp;
- /** The sequence number of latest RTP packet received */
- int rtpSequenceNumber;
- /** The system clock time in millisecond of latest RTP packet received */
- int timeDurationMs;
- /** The jitter buffer size in millisecond when latest RTP packet received */
+
+ /** The timestamp of the latest RTCP-SR packet received */
+ int rtcpSrTimestamp;
+
+ /** The NTP timestamp of latest RTCP-SR packet received */
+ long rtcpSrNtpTimestamp;
+
+ /**
+ * The mean jitter buffer delay of a media stream from received to playback, measured in
+ * milliseconds, within the reporting interval
+ */
int jitterBufferMs;
+
/** The round trip time delay in millisecond when latest RTP packet received */
int roundTripTimeMs;
}
diff --git a/radio/aidl/android/hardware/radio/network/ConnectionEvent.aidl b/radio/aidl/android/hardware/radio/network/ConnectionEvent.aidl
index 2e39ebf..d5f367f 100644
--- a/radio/aidl/android/hardware/radio/network/ConnectionEvent.aidl
+++ b/radio/aidl/android/hardware/radio/network/ConnectionEvent.aidl
@@ -42,14 +42,20 @@
AS_SIGNALLING_LTE = 5,
// VoLTE
+ // Note: emergency calls could use either normal or SOS (emergency) PDN in practice
VOLTE_SIP = 6,
- VOLTE_RTP = 7,
+ VOLTE_SIP_SOS = 7,
+ VOLTE_RTP = 8,
+ VOLTE_RTP_SOS = 9,
// 5G packet services
- NAS_SIGNALLING_5G = 8,
- AS_SIGNALLING_5G = 9,
+ NAS_SIGNALLING_5G = 10,
+ AS_SIGNALLING_5G = 11,
// VoNR
- VONR_SIP = 10,
- VONR_RTP = 11,
+ // Note: emergency calls could use either normal or SOS (emergency) PDN in practice
+ VONR_SIP = 12,
+ VONR_SIP_SOS = 13,
+ VONR_RTP = 14,
+ VONR_RTP_SOS = 15
}
diff --git a/radio/aidl/android/hardware/radio/network/SecurityAlgorithm.aidl b/radio/aidl/android/hardware/radio/network/SecurityAlgorithm.aidl
index 19feeef..01f7327 100644
--- a/radio/aidl/android/hardware/radio/network/SecurityAlgorithm.aidl
+++ b/radio/aidl/android/hardware/radio/network/SecurityAlgorithm.aidl
@@ -60,7 +60,11 @@
NEA3 = 58,
// IMS and SIP layer security (See 3GPP TS 33.203)
+ // No IPsec config
+ SIP_NO_IPSEC_CONFIG = 66,
IMS_NULL = 67,
+
+ // Has IPsec config
SIP_NULL = 68,
AES_GCM = 69,
AES_GMAC = 70,
@@ -70,7 +74,10 @@
HMAC_SHA1_96 = 74,
HMAC_MD5_96 = 75,
- // RTP (see 3GPP TS 33.328)
+ // RTP and SRTP (see 3GPP TS 33.328)
+ // When SRTP is not being used
+ RTP = 85,
+ // When SRTP is available and used
SRTP_NULL = 86,
SRTP_AES_COUNTER = 87,
SRTP_AES_F8 = 88,
diff --git a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
index 54f187c..808ed18 100644
--- a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
+++ b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
@@ -149,7 +149,9 @@
digest512.data());
ASSERT_TRUE((attestedVbmetaDigest_ == digest256) || (attestedVbmetaDigest_ == digest512))
- << "Attested digest does not match computed digest.";
+ << "Attested vbmeta digest (" << bin2hex(attestedVbmetaDigest_)
+ << ") does not match computed digest (sha256: " << bin2hex(digest256)
+ << ", sha512: " << bin2hex(digest512) << ").";
}
INSTANTIATE_KEYMINT_AIDL_TEST(BootloaderStateTest);
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index d3f6ae3..087f763 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -64,6 +64,13 @@
namespace {
+// Possible values for the feature version. Assumes that future KeyMint versions
+// will continue with the 100 * AIDL_version numbering scheme.
+//
+// Must be kept in numerically increasing order.
+const int32_t kFeatureVersions[] = {10, 11, 20, 30, 40, 41, 100, 200,
+ 300, 400, 500, 600, 700, 800, 900};
+
// Invalid value for a patchlevel (which is of form YYYYMMDD).
const uint32_t kInvalidPatchlevel = 99998877;
@@ -2278,6 +2285,43 @@
return hasFeature;
}
+// Return the numeric value associated with a feature.
+std::optional<int32_t> keymint_feature_value(bool strongbox) {
+ std::string name = strongbox ? FEATURE_STRONGBOX_KEYSTORE : FEATURE_HARDWARE_KEYSTORE;
+ ::android::String16 name16(name.c_str());
+ ::android::sp<::android::IServiceManager> sm(::android::defaultServiceManager());
+ ::android::sp<::android::IBinder> binder(
+ sm->waitForService(::android::String16("package_native")));
+ if (binder == nullptr) {
+ GTEST_LOG_(ERROR) << "waitForService package_native failed";
+ return std::nullopt;
+ }
+ ::android::sp<::android::content::pm::IPackageManagerNative> packageMgr =
+ ::android::interface_cast<::android::content::pm::IPackageManagerNative>(binder);
+ if (packageMgr == nullptr) {
+ GTEST_LOG_(ERROR) << "Cannot find package manager";
+ return std::nullopt;
+ }
+
+ // Package manager has no mechanism to retrieve the version of a feature,
+ // only to indicate whether a certain version or above is present.
+ std::optional<int32_t> result = std::nullopt;
+ for (auto version : kFeatureVersions) {
+ bool hasFeature = false;
+ auto status = packageMgr->hasSystemFeature(name16, version, &hasFeature);
+ if (!status.isOk()) {
+ GTEST_LOG_(ERROR) << "hasSystemFeature('" << name << "', " << version
+ << ") failed: " << status;
+ return result;
+ } else if (hasFeature) {
+ result = version;
+ } else {
+ break;
+ }
+ }
+ return result;
+}
+
} // namespace test
} // namespace aidl::android::hardware::security::keymint
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 4fb711c..4ed7698 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -56,6 +56,7 @@
const string FEATURE_KEYSTORE_APP_ATTEST_KEY = "android.hardware.keystore.app_attest_key";
const string FEATURE_STRONGBOX_KEYSTORE = "android.hardware.strongbox_keystore";
+const string FEATURE_HARDWARE_KEYSTORE = "android.hardware.hardware_keystore";
// RAII class to ensure that a keyblob is deleted regardless of how a test exits.
class KeyBlobDeleter {
@@ -444,6 +445,7 @@
void p256_pub_key(const vector<uint8_t>& coseKeyData, EVP_PKEY_Ptr* signingKey);
void device_id_attestation_check_acceptable_error(Tag tag, const ErrorCode& result);
bool check_feature(const std::string& name);
+std::optional<int32_t> keymint_feature_value(bool strongbox);
AuthorizationSet HwEnforcedAuthorizations(const vector<KeyCharacteristics>& key_characteristics);
AuthorizationSet SwEnforcedAuthorizations(const vector<KeyCharacteristics>& key_characteristics);
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index a2e20dc..e098aca 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -21,6 +21,7 @@
#include <algorithm>
#include <iostream>
+#include <map>
#include <openssl/curve25519.h>
#include <openssl/ec.h>
@@ -1027,9 +1028,9 @@
* The KeyMint V1 spec required that CERTIFICATE_NOT_{BEFORE,AFTER} be
* specified for asymmetric key generation. However, this was not
* checked at the time so we can only be strict about checking this for
- * implementations of KeyMint version 2 and above.
+ * implementations of KeyMint version 3 and above.
*/
- GTEST_SKIP() << "Validity strict since KeyMint v2";
+ GTEST_SKIP() << "Validity strict since KeyMint v3";
}
// Per RFC 5280 4.1.2.5, an undefined expiration (not-after) field should be set to
// GeneralizedTime 999912312359559, which is 253402300799000 ms from Jan 1, 1970.
@@ -8794,6 +8795,90 @@
INSTANTIATE_KEYMINT_AIDL_TEST(VsrRequirementTest);
+class InstanceTest : public testing::Test {
+ protected:
+ static void SetUpTestSuite() {
+ auto params = ::android::getAidlHalInstanceNames(IKeyMintDevice::descriptor);
+ for (auto& param : params) {
+ ASSERT_TRUE(AServiceManager_isDeclared(param.c_str()))
+ << "IKeyMintDevice instance " << param << " found but not declared.";
+ ::ndk::SpAIBinder binder(AServiceManager_waitForService(param.c_str()));
+ auto keymint = IKeyMintDevice::fromBinder(binder);
+ ASSERT_NE(keymint, nullptr) << "Failed to get IKeyMintDevice instance " << param;
+
+ KeyMintHardwareInfo info;
+ ASSERT_TRUE(keymint->getHardwareInfo(&info).isOk());
+ ASSERT_EQ(keymints_.count(info.securityLevel), 0)
+ << "There must be exactly one IKeyMintDevice with security level "
+ << info.securityLevel;
+
+ keymints_[info.securityLevel] = std::move(keymint);
+ }
+ }
+
+ int32_t AidlVersion(shared_ptr<IKeyMintDevice> keymint) {
+ int32_t version = 0;
+ auto status = keymint->getInterfaceVersion(&version);
+ if (!status.isOk()) {
+ ADD_FAILURE() << "Failed to determine interface version";
+ }
+ return version;
+ }
+
+ static std::map<SecurityLevel, shared_ptr<IKeyMintDevice>> keymints_;
+};
+
+std::map<SecurityLevel, shared_ptr<IKeyMintDevice>> InstanceTest::keymints_;
+
+// @VsrTest = VSR-3.10-017
+// Check that the AIDL version advertised by the HAL service matches
+// the value in the package manager feature version.
+TEST_F(InstanceTest, AidlVersionInFeature) {
+ if (is_gsi_image()) {
+ GTEST_SKIP() << "Versions not required to match under GSI";
+ }
+ if (keymints_.count(SecurityLevel::TRUSTED_ENVIRONMENT) == 1) {
+ auto tee = keymints_.find(SecurityLevel::TRUSTED_ENVIRONMENT)->second;
+ int32_t tee_aidl_version = AidlVersion(tee) * 100;
+ std::optional<int32_t> tee_feature_version = keymint_feature_value(/* strongbox */ false);
+ ASSERT_TRUE(tee_feature_version.has_value());
+ EXPECT_EQ(tee_aidl_version, tee_feature_version.value());
+ }
+ if (keymints_.count(SecurityLevel::STRONGBOX) == 1) {
+ auto sb = keymints_.find(SecurityLevel::STRONGBOX)->second;
+ int32_t sb_aidl_version = AidlVersion(sb) * 100;
+ std::optional<int32_t> sb_feature_version = keymint_feature_value(/* strongbox */ true);
+ ASSERT_TRUE(sb_feature_version.has_value());
+ EXPECT_EQ(sb_aidl_version, sb_feature_version.value());
+ }
+}
+
+// @VsrTest = VSR-3.10-017
+// Check that if package manager advertises support for KeyMint of a particular version, that
+// version is present as a HAL service.
+TEST_F(InstanceTest, FeatureVersionInAidl) {
+ if (is_gsi_image()) {
+ GTEST_SKIP() << "Versions not required to match under GSI";
+ }
+ std::optional<int32_t> tee_feature_version = keymint_feature_value(/* strongbox */ false);
+ if (tee_feature_version.has_value() && tee_feature_version.value() >= 100) {
+ // Feature flag advertises the existence of KeyMint; check it is present.
+ ASSERT_EQ(keymints_.count(SecurityLevel::TRUSTED_ENVIRONMENT), 1);
+ auto tee = keymints_.find(SecurityLevel::TRUSTED_ENVIRONMENT)->second;
+ int32_t tee_aidl_version = AidlVersion(tee) * 100;
+ EXPECT_EQ(tee_aidl_version, tee_feature_version.value());
+ }
+
+ std::optional<int32_t> sb_feature_version = keymint_feature_value(/* strongbox */ true);
+ if (sb_feature_version.has_value() && sb_feature_version.value() >= 100) {
+ // Feature flag advertises the existence of KeyMint; check it is present.
+ ASSERT_EQ(keymints_.count(SecurityLevel::STRONGBOX), 1);
+ auto sb = keymints_.find(SecurityLevel::STRONGBOX)->second;
+ int32_t sb_aidl_version = AidlVersion(sb) * 100;
+ EXPECT_EQ(sb_aidl_version, sb_feature_version.value());
+ }
+}
+
} // namespace aidl::android::hardware::security::keymint::test
using aidl::android::hardware::security::keymint::test::KeyMintAidlTestBase;
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTestConfigurations.h b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTestConfigurations.h
index 5c13ed0..ff94639 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTestConfigurations.h
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTestConfigurations.h
@@ -731,9 +731,20 @@
if (videoFilterIds.empty() || audioFilterIds.empty() || frontendMap.empty()) {
return;
}
- if (hasSwFe && !hasHwFe && dvrMap.empty()) {
- ALOGD("Cannot configure Live. Only software frontends and no dvr connections");
- return;
+ if (!hasHwFe) {
+ if (hasSwFe) {
+ if (dvrMap.empty()) {
+ ALOGD("Cannot configure Live. Only software frontends and no dvr connections.");
+ return;
+ }
+ // Live is available if there is SW FE and some DVR is attached.
+ } else {
+ // We will arrive here because frontendMap won't be empty since
+ // there will be at least a default frontend declared. But the
+ // default frontend doesn't count as "hasSwFe".
+ ALOGD("Cannot configure Live. No frontend declared at all.");
+ return;
+ }
}
ALOGD("Can support live");
live.hasFrontendConnection = true;
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 f09a26b..fa7149f 100644
--- a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
@@ -71,7 +71,7 @@
// Checks if the mDNS Offload is supported by any NIC.
bool isMdnsOffloadPresentInNIC() {
- return testing::deviceSupportsFeature("android.hardware.mdns_offload");
+ return testing::deviceSupportsFeature("com.google.android.tv.mdns_offload");
}
// Detected panel TV device by using ro.oem.key1 property.