Corrections to widevine plugin for vts tests

Add a check for invalid session size in restoreKeys
and correct the return code when attempting to create a
plugin with an invalid uuid. Also correct the return code
when attempting to decrypt after keys have been removed.

bug:37172151
Change-Id: I7e832ffe04081471a0cdb3a9329808f47f12cfc3
This commit is contained in:
Jeff Tinker
2017-04-13 00:22:38 -07:00
parent 20f8368f9c
commit 6c15ea673d
3 changed files with 5 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ Return<void> WVDrmFactory::createPlugin(
if (!isCryptoSchemeSupported(uuid.data())) {
ALOGE("Widevine Drm HAL: failed to create drm plugin, " \
"invalid crypto scheme");
_hidl_cb(Status::BAD_VALUE, plugin);
_hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, plugin);
return Void();
}