Revert "Core CDM: Removed secure stop support."
This reverts commit b039f31b27.
Reason for revert: Feature rejected by Android
Bug: 242289743
Change-Id: I8cd6014b4e2de93b3c574d407d6c8885863fed4f
This commit is contained in:
committed by
Android (Google) Code Review
parent
b039f31b27
commit
16a4c2690a
@@ -75,6 +75,12 @@ class CdmSession {
|
||||
virtual CdmResponseType RestoreOfflineSession(const CdmKeySetId& key_set_id,
|
||||
CdmLicenseType license_type,
|
||||
int* error_detail);
|
||||
// Restores an usage session from the provided |usage_data|.
|
||||
// The |error_detail| will be filled with an internal error code. The
|
||||
// |error_detail| may be a CdmResponseType or other error code type. It is
|
||||
// only suitable for additional logging or debugging.
|
||||
virtual CdmResponseType RestoreUsageSession(
|
||||
const DeviceFiles::CdmUsageData& usage_data, int* error_detail);
|
||||
|
||||
virtual const CdmSessionId& session_id() { return session_id_; }
|
||||
virtual const CdmKeySetId& key_set_id() { return key_set_id_; }
|
||||
@@ -144,7 +150,7 @@ class CdmSession {
|
||||
|
||||
virtual bool is_initial_usage_update() { return is_initial_usage_update_; }
|
||||
virtual bool is_usage_update_needed() { return is_usage_update_needed_; }
|
||||
virtual void ResetUsageFlags() {
|
||||
virtual void reset_usage_flags() {
|
||||
is_initial_usage_update_ = false;
|
||||
is_usage_update_needed_ = false;
|
||||
}
|
||||
@@ -153,19 +159,12 @@ class CdmSession {
|
||||
virtual bool is_offline() { return is_offline_; }
|
||||
virtual bool is_temporary() { return is_temporary_; }
|
||||
virtual bool license_received() { return license_received_; }
|
||||
|
||||
virtual bool HasUsageEntry() {
|
||||
// The PST is only set if a usage entry has been loaded.
|
||||
return provider_session_token_.size() > 0;
|
||||
}
|
||||
virtual const std::string& provider_session_token() {
|
||||
return provider_session_token_;
|
||||
}
|
||||
void SetProviderSessionTokenForTest(const std::string& pst) {
|
||||
provider_session_token_ = pst;
|
||||
virtual bool has_provider_session_token() {
|
||||
return (license_parser_ &&
|
||||
license_parser_->provider_session_token().size() > 0);
|
||||
}
|
||||
|
||||
virtual bool SupportsUsageEntries() const {
|
||||
virtual bool supports_usage_info() const {
|
||||
return usage_table_header_ != nullptr;
|
||||
}
|
||||
|
||||
@@ -244,6 +243,8 @@ class CdmSession {
|
||||
|
||||
bool StoreLicense(CdmOfflineLicenseState state, int* error_detail);
|
||||
|
||||
bool UpdateUsageInfo();
|
||||
|
||||
CdmResponseType GenerateKeyRequestInternal(
|
||||
const InitializationData& init_data, CdmLicenseType license_type,
|
||||
const CdmAppParameterMap& app_parameters, CdmKeyRequest* key_request);
|
||||
@@ -304,15 +305,14 @@ class CdmSession {
|
||||
bool last_decrypt_failed_ = false;
|
||||
|
||||
// Usage related flags and data
|
||||
bool is_initial_usage_update_ = true;
|
||||
bool is_usage_update_needed_ = false;
|
||||
bool is_initial_usage_update_;
|
||||
bool is_usage_update_needed_;
|
||||
// Only assign |usage_table_header_| if capable of supporting usage
|
||||
// information.
|
||||
UsageTableHeader* usage_table_header_ = nullptr;
|
||||
uint32_t usage_entry_number_ = 0;
|
||||
uint32_t usage_entry_number_;
|
||||
CdmUsageEntry usage_entry_;
|
||||
// This PST should only be set if the session has a usage entry.
|
||||
std::string provider_session_token_;
|
||||
std::string usage_provider_session_token_;
|
||||
|
||||
// information useful for offline and usage scenarios
|
||||
CdmKeyMessage key_request_;
|
||||
|
||||
Reference in New Issue
Block a user