mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "VTS: Remove enforce codec2 on ATV for S devices" am: 842e6219c2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2054806 Change-Id: Id16fe9b973ff934d0efb4c1d0af2ad4bb933e146 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include <android-base/strings.h>
|
#include <android-base/strings.h>
|
||||||
#include <android/api-level.h>
|
#include <android/api-level.h>
|
||||||
|
|
||||||
|
#include <VtsCoreUtil.h>
|
||||||
#include <android/hardware/media/omx/1.0/IOmx.h>
|
#include <android/hardware/media/omx/1.0/IOmx.h>
|
||||||
#include <android/hardware/media/omx/1.0/IOmxNode.h>
|
#include <android/hardware/media/omx/1.0/IOmxNode.h>
|
||||||
#include <android/hardware/media/omx/1.0/IOmxObserver.h>
|
#include <android/hardware/media/omx/1.0/IOmxObserver.h>
|
||||||
@@ -377,6 +378,10 @@ static int getFirstApiLevel() {
|
|||||||
return android::base::GetIntProperty("ro.product.first_api_level", __ANDROID_API_T__);
|
return android::base::GetIntProperty("ro.product.first_api_level", __ANDROID_API_T__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool isTV() {
|
||||||
|
return testing::deviceSupportsFeature("android.software.leanback");
|
||||||
|
}
|
||||||
|
|
||||||
// list components and roles.
|
// list components and roles.
|
||||||
TEST_P(StoreHidlTest, OmxCodecAllowedTest) {
|
TEST_P(StoreHidlTest, OmxCodecAllowedTest) {
|
||||||
hidl_vec<IOmx::ComponentInfo> componentInfos = getComponentInfoList(omx);
|
hidl_vec<IOmx::ComponentInfo> componentInfos = getComponentInfoList(omx);
|
||||||
@@ -384,9 +389,16 @@ TEST_P(StoreHidlTest, OmxCodecAllowedTest) {
|
|||||||
for (std::string role : info.mRoles) {
|
for (std::string role : info.mRoles) {
|
||||||
if (role.find("video_decoder") != std::string::npos ||
|
if (role.find("video_decoder") != std::string::npos ||
|
||||||
role.find("video_encoder") != std::string::npos) {
|
role.find("video_encoder") != std::string::npos) {
|
||||||
ASSERT_LT(getFirstApiLevel(), __ANDROID_API_S__)
|
// Codec2 is not mandatory on Android TV devices that launched with Android S
|
||||||
<< " Component: " << info.mName.c_str() << " Role: " << role.c_str()
|
if (isTV()) {
|
||||||
<< " not allowed for devices launching with Android S and above";
|
ASSERT_LT(getFirstApiLevel(), __ANDROID_API_T__)
|
||||||
|
<< " 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__)
|
||||||
|
<< " 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 ||
|
if (role.find("audio_decoder") != std::string::npos ||
|
||||||
role.find("audio_encoder") != std::string::npos) {
|
role.find("audio_encoder") != std::string::npos) {
|
||||||
|
|||||||
Reference in New Issue
Block a user