Disallow the ability to load offline licenses more than once
[ Merge of http://go/wvgerrit/123263 ] In b/65839890 we discovered that an android app loaded an offline license more than once in a session. We did not intend to allow this behavior but did not prohibit it. OEMCrypto v16 disallowed this behavior at the OEMCrypto level but we worked around it within the CDM to maintain the bad behavior. Now that we have confirmed that the app no longer relies on that behavior, we are reverting the CDM workaround. Bug: 161865160 Test: WV unit/integration test, GtsMediaTestCases Amazon, Netflix, Google TV streaming and offline playback. Change-Id: I31254e4c13b81587f88c6c684d08d5aa5c18e39d
This commit is contained in:
@@ -253,12 +253,6 @@ class CdmSession {
|
||||
// true otherwise.
|
||||
bool VerifyOfflineUsageEntry();
|
||||
|
||||
// On android, we previously permitted a license to be loaded and restored
|
||||
// in the same session. This method releases resources so that
|
||||
// CdmSession::Init can safely be invoked before a new license is restored.
|
||||
// TODO(b/161865160): Investigate whether we can dispense with this scenario.
|
||||
virtual CdmResponseType ReleaseOfflineResources();
|
||||
|
||||
// These setters are for testing only. Takes ownership of the pointers.
|
||||
void set_license_parser(CdmLicense* license_parser);
|
||||
void set_crypto_session(CryptoSession* crypto_session);
|
||||
@@ -318,21 +312,6 @@ class CdmSession {
|
||||
// license type release and offline related information
|
||||
CdmKeySetId key_set_id_;
|
||||
|
||||
// TODO(b/161865160): Use these variables to cache Init parameters. Remove
|
||||
// when b/ has been addressed.
|
||||
// |cdm_client_property_set_| and |event_listener_| point to a data
|
||||
// member of WVDrmPlugin or WVDrmPlugin itself. It is safe for CdmSession
|
||||
// to make use of these objects without taking ownership since WVDrmPlugin
|
||||
// lifetime exceeds CdmSession (WVDrmPlugin indirectly owns CdmSession
|
||||
// objects). These pointers if set, should be valid till CdmSession
|
||||
// destruction.
|
||||
CdmClientPropertySet* cdm_client_property_set_ = nullptr;
|
||||
CdmSessionId* forced_session_id_ = nullptr;
|
||||
CdmSessionId forced_session_id_value_;
|
||||
WvCdmEventListener* event_listener_ = nullptr;
|
||||
bool has_license_been_loaded_ = false;
|
||||
bool has_license_been_restored_ = false;
|
||||
|
||||
bool mock_license_parser_in_use_;
|
||||
bool mock_policy_engine_in_use_;
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ enum CdmResponseType : int32_t {
|
||||
SHRINK_USAGE_TABLE_HEADER_ENTRY_IN_USE = 359,
|
||||
LICENSE_USAGE_ENTRY_MISSING = 360,
|
||||
LOAD_USAGE_ENTRY_INVALID_SESSION = 361,
|
||||
RESTORE_OFFLINE_LICENSE_ERROR_3 = 362,
|
||||
// previously RESTORE_OFFLINE_LICENSE_ERROR_3 = 362,
|
||||
NO_SRM_VERSION = 363,
|
||||
SESSION_NOT_FOUND_23 = 364,
|
||||
CERT_PROVISIONING_RESPONSE_ERROR_9 = 365,
|
||||
|
||||
Reference in New Issue
Block a user