wv hidl: upgrade Drm/Crypto factories to v1.3

Bug: 139134043
Test: MediaDrmTest
Change-Id: I94d1cc8a323c144805d74d5568944dd48ae80e60
This commit is contained in:
Robert Shih
2019-12-02 16:20:13 -08:00
parent 2443fe807a
commit 8fce3e316b
25 changed files with 180 additions and 41 deletions

View File

@@ -22,9 +22,11 @@
namespace wvdrm {
namespace hardware {
namespace drm {
namespace V1_2 {
namespace V1_3 {
namespace widevine {
using wvdrm::hardware::drm::V1_2::widevine::WVDrmPlugin;
WVGenericCryptoInterface WVDrmFactory::sOemCryptoInterface;
Return<bool> WVDrmFactory::isCryptoSchemeSupported(
@@ -67,7 +69,7 @@ Return<void> WVDrmFactory::createPlugin(
const auto& self = android::hardware::IPCThreadState::self();
const char* sid = self->getCallingSid();
sid = sid ? (strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
ALOGI("[%s] calling %s", sid, __PRETTY_FUNCTION__);
ALOGI("[%s][%s] calling %s", sid, appPackageName.c_str(), __PRETTY_FUNCTION__);
sp<IDrmPlugin> plugin;
if (!isCryptoSchemeSupported(uuid.data())) {
@@ -112,9 +114,17 @@ int32_t WVDrmFactory::firstApiLevel() {
return firstApiLevel;
}
Return<void> WVDrmFactory::getSupportedCryptoSchemes(getSupportedCryptoSchemes_cb _hidl_cb) {
std::vector<hidl_array<uint8_t, 16>> schemes;
for (const auto &scheme : wvdrm::getSupportedCryptoSchemes()) {
schemes.push_back(scheme);
}
_hidl_cb(schemes);
return Void();
}
} // namespace widevine
} // namespace V1_2
} // namespace V1_3
} // namespace drm
} // namespace hardware
} // namespace wvdrm