Revert "Revert "Update drm hal to find drm@1.1 factories""
This reverts commit d3eece8aa39560e8458ba8231b8684d99f11ee6b.
Change-Id: I15ca1dba1a384ccc026406f0a9a02c2598873456
diff --git a/drm/libmediadrm/CryptoHal.cpp b/drm/libmediadrm/CryptoHal.cpp
index 2114d40..4377154 100644
--- a/drm/libmediadrm/CryptoHal.cpp
+++ b/drm/libmediadrm/CryptoHal.cpp
@@ -118,15 +118,24 @@
auto manager = ::IServiceManager::getService();
if (manager != NULL) {
- manager->listByInterface(ICryptoFactory::descriptor,
+ manager->listByInterface(drm::V1_0::ICryptoFactory::descriptor,
[&factories](const hidl_vec<hidl_string> ®istered) {
for (const auto &instance : registered) {
- auto factory = ICryptoFactory::getService(instance);
+ auto factory = drm::V1_0::ICryptoFactory::getService(instance);
if (factory != NULL) {
+ ALOGD("found drm@1.0 ICryptoFactory %s", instance.c_str());
factories.push_back(factory);
- ALOGI("makeCryptoFactories: factory instance %s is %s",
- instance.c_str(),
- factory->isRemote() ? "Remote" : "Not Remote");
+ }
+ }
+ }
+ );
+ manager->listByInterface(drm::V1_1::ICryptoFactory::descriptor,
+ [&factories](const hidl_vec<hidl_string> ®istered) {
+ for (const auto &instance : registered) {
+ auto factory = drm::V1_1::ICryptoFactory::getService(instance);
+ if (factory != NULL) {
+ ALOGD("found drm@1.1 ICryptoFactory %s", instance.c_str());
+ factories.push_back(factory);
}
}
}
@@ -137,7 +146,7 @@
// must be in passthrough mode, load the default passthrough service
auto passthrough = ICryptoFactory::getService();
if (passthrough != NULL) {
- ALOGI("makeCryptoFactories: using default crypto instance");
+ ALOGI("makeCryptoFactories: using default passthrough crypto instance");
factories.push_back(passthrough);
} else {
ALOGE("Failed to find any crypto factories");