From 1e8510120f8efc4a57d8e547470e8434a8c9b1ec Mon Sep 17 00:00:00 2001 From: Arun Johnson Date: Fri, 24 Jun 2022 18:17:00 +0000 Subject: [PATCH] Allowing OMX.google* codecs for Devices launching with S S AOSP did not remove the OMX.google* codecs, so this cannot be enforced for devices launching with S bug: 230582620 Change-Id: I25e8f827645db8e83c8c3142f5e76a912fdf7b22 (cherry picked from commit 6973e79b917ff1b7b0febddee69dd245f4222b22) --- .../store/VtsHalMediaOmxV1_0TargetStoreTest.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp b/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp index 2ae9c2b001..00e9837710 100755 --- a/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp +++ b/media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp @@ -400,9 +400,18 @@ TEST_P(StoreHidlTest, OmxCodecAllowedTest) { << " Component: " << info.mName.c_str() << " Role: " << role.c_str() << " not allowed for devices launching with Android T and above"; } else { - ASSERT_LT(getFirstApiLevel(), __ANDROID_API_S__) + std::string codecName = info.mName; + bool isAndroidCodec = (codecName.rfind("OMX.google", 0) != std::string::npos); + if (isAndroidCodec && (getFirstApiLevel() <= __ANDROID_API_S__)) { + // refer b/230582620 + // S AOSP build did not remove the OMX.google video codecs + // so it is infeasible to require no OMX.google.* video codecs + // on S launching devices + } else { + ASSERT_LT(getFirstApiLevel(), __ANDROID_API_S__) << " Component: " << info.mName.c_str() << " Role: " << role.c_str() << " not allowed for devices launching with Android S and above"; + } } } if (role.find("audio_decoder") != std::string::npos ||