summaryrefslogtreecommitdiff
path: root/drm/aidl/vts/drm_hal_common.cpp
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2023-07-04 20:04:45 +0800
committeralk3pInjection <webmaster@raspii.tech>2023-07-04 20:04:45 +0800
commite1390d22fae12df2784992b3ba238af8e90eaecc (patch)
tree52dfbc4cd9931c722b210f063c144fe97a706af5 /drm/aidl/vts/drm_hal_common.cpp
parentb3f20c2aa61e4a6e07e8c06cf3623f1666620e1f (diff)
parent7c8943fde12ec5fb0f9629746c65e8b1bc78d1b4 (diff)
Merge tag 'LA.QSSI.13.0.r1-10700-qssi.0' into tachibana-mr1tachibana-mr1
"LA.QSSI.13.0.r1-10700-qssi.0" Change-Id: I11f0f2cb764e800ff1fd298c5a6443b98cf9a8a3
Diffstat (limited to 'drm/aidl/vts/drm_hal_common.cpp')
-rw-r--r--drm/aidl/vts/drm_hal_common.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/drm/aidl/vts/drm_hal_common.cpp b/drm/aidl/vts/drm_hal_common.cpp
index 7de81670ab..f0445a503f 100644
--- a/drm/aidl/vts/drm_hal_common.cpp
+++ b/drm/aidl/vts/drm_hal_common.cpp
@@ -187,6 +187,12 @@ void DrmHalTest::SetUp() {
auto svc = GetParamService();
const string drmInstance = HalFullName(kDrmIface, svc);
+ if (!vendorModule) {
+ ASSERT_NE(drmInstance, HalFullName(kDrmIface, "widevine")) << "Widevine requires vendor module.";
+ ASSERT_NE(drmInstance, HalFullName(kDrmIface, "clearkey")) << "Clearkey requires vendor module.";
+ GTEST_SKIP() << "No vendor module installed";
+ }
+
if (drmInstance.find("IDrmFactory") != std::string::npos) {
drmFactory = IDrmFactory::fromBinder(
::ndk::SpAIBinder(AServiceManager_waitForService(drmInstance.c_str())));
@@ -195,12 +201,6 @@ void DrmHalTest::SetUp() {
cryptoPlugin = createCryptoPlugin();
}
- if (!vendorModule) {
- ASSERT_NE(drmInstance, "widevine") << "Widevine requires vendor module.";
- ASSERT_NE(drmInstance, "clearkey") << "Clearkey requires vendor module.";
- GTEST_SKIP() << "No vendor module installed";
- }
-
ASSERT_EQ(HalBaseName(drmInstance), vendorModule->getServiceName());
contentConfigurations = vendorModule->getContentConfigurations();
@@ -263,6 +263,9 @@ std::vector<uint8_t> DrmHalTest::getVendorUUID() {
}
bool DrmHalTest::isCryptoSchemeSupported(Uuid uuid, SecurityLevel level, std::string mime) {
+ if (drmFactory == nullptr) {
+ return false;
+ }
CryptoSchemes schemes{};
auto ret = drmFactory->getSupportedCryptoSchemes(&schemes);
EXPECT_OK(ret);