Merge "[Large Audio frame support] Add aconfig feature flags" into main
diff --git a/media/module/codecserviceregistrant/fuzzer/codecServiceRegistrant_fuzzer.cpp b/media/module/codecserviceregistrant/fuzzer/codecServiceRegistrant_fuzzer.cpp
index e5983e4..fba4230 100644
--- a/media/module/codecserviceregistrant/fuzzer/codecServiceRegistrant_fuzzer.cpp
+++ b/media/module/codecserviceregistrant/fuzzer/codecServiceRegistrant_fuzzer.cpp
@@ -17,6 +17,7 @@
#include "fuzzer/FuzzedDataProvider.h"
#include <C2Config.h>
#include <C2Param.h>
+#include <android/api-level.h>
using namespace std;
@@ -59,11 +60,31 @@
if (!store) {
return;
}
- android::sp<V1_1::IComponentStore> storeV1_1 =
+
+ int32_t platformVersion = android_get_device_api_level();
+ if (platformVersion >= __ANDROID_API_S__) {
+ android::sp<V1_2::IComponentStore> storeV1_2 =
+ new V1_2::utils::ComponentStore(store);
+ if (storeV1_2->registerAsService(string(kServiceName)) != android::OK) {
+ return;
+ }
+ } else if (platformVersion == __ANDROID_API_R__) {
+ android::sp<V1_1::IComponentStore> storeV1_1 =
new V1_1::utils::ComponentStore(store);
- if (storeV1_1->registerAsService(string(kServiceName)) != android::OK) {
+ if (storeV1_1->registerAsService(string(kServiceName)) != android::OK) {
+ return;
+ }
+ } else if (platformVersion == __ANDROID_API_Q__) {
+ android::sp<V1_0::IComponentStore> storeV1_0 =
+ new V1_0::utils::ComponentStore(store);
+ if (storeV1_0->registerAsService(string(kServiceName)) != android::OK) {
+ return;
+ }
+ }
+ else {
return;
}
+
string const preferredStoreName = string(kServiceName);
sp<IComponentStore> preferredStore =
IComponentStore::getService(preferredStoreName.c_str());
diff --git a/media/mtp/tests/MtpFuzzer/mtp_packet_fuzzer.cpp b/media/mtp/tests/MtpFuzzer/mtp_packet_fuzzer.cpp
index 6fc2a96..e4df321 100644
--- a/media/mtp/tests/MtpFuzzer/mtp_packet_fuzzer.cpp
+++ b/media/mtp/tests/MtpFuzzer/mtp_packet_fuzzer.cpp
@@ -18,6 +18,7 @@
#include <MtpPacket.h>
#include <MtpPacketFuzzerUtils.h>
#include <fuzzer/FuzzedDataProvider.h>
+#include <mtp.h>
using namespace android;
@@ -35,7 +36,8 @@
};
void MtpPacketFuzzer::process() {
- MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(kMinSize, kMaxSize)); /*bufferSize*/
+ MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(MTP_CONTAINER_HEADER_SIZE,
+ kMaxSize)); /*bufferSize*/
while (mFdp.remaining_bytes() > 0) {
auto mtpPacketAPI = mFdp.PickValueInArray<const std::function<void()>>({
[&]() {