Implement MediaDrm offline license support in Widevine hidl service.

Merged from http://go/wvgerrit/69723.

The new APIs are getOfflineLicenseIds, getOfflineLicenseState and
removeOfflineLicense. These methods are currently stubbed out in
Widevine hidl service. This CL completes the implementation.

Test: unit tests - libwvdrmdrmplugin_hidl_test

Test: GTS
  --test com.google.android.media.gts.MediaDrmTest#testWidevineApi29

bug: 117570686
Change-Id: I96ffb75f453e36e931effefd3664b5faa8d69d30
This commit is contained in:
Edwin Wong
2019-01-21 17:07:43 -08:00
parent 19c4996b3c
commit 54104c7a22
12 changed files with 462 additions and 30 deletions

View File

@@ -154,6 +154,12 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
case GET_LICENSE_ERROR:
*os << "GET_LICENSE_ERROR";
break;
case GET_OFFLINE_LICENSE_STATE_ERROR_1:
*os << "GET_OFFLINE_LICENSE_STATE_ERROR_1";
break;
case GET_OFFLINE_LICENSE_STATE_ERROR_2:
*os << "GET_OFFLINE_LICENSE_STATE_ERROR_2";
break;
case GET_RELEASED_LICENSE_ERROR:
*os << "GET_RELEASED_LICENSE_ERROR";
break;
@@ -784,6 +790,9 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
case SESSION_NOT_FOUND_20:
*os << "SESSION_NOT_FOUND_20";
break;
case SESSION_NOT_FOUND_21:
*os << "SESSION_NOT_FOUND_21";
break;
case INVALID_DECRYPT_HASH_FORMAT:
*os << "INVALID_DECRYPT_HASH_FORMAT";
break;
@@ -825,6 +834,11 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
break;
case SESSION_KEYS_NOT_FOUND_2:
*os << "SESSION_KEYS_NOT_FOUND_2";
case REMOVE_OFFLINE_LICENSE_ERROR_1:
*os << "REMOVE_OFFLINE_LICENSE_ERROR_1";
break;
case REMOVE_OFFLINE_LICENSE_ERROR_2:
*os << "REMOVE_OFFLINE_LICENSE_ERROR_2";
break;
default:
*os << "Unknown CdmResponseType";