Delay OEMCrypto Termination
[ Merge of http://go/wvgerrit/89847 ] This adds a platform specific property that allows OEMCrypto Termination calls to be delayed. On android this allows a way to avoid expensive back to back OEMCrypto_Terminate followed by Initialize calls. Bug: 136282358 Test: wv unit/integration tests Change-Id: Ie5b4ff7503dafe77d974caac9c52fc1f169dec89
This commit is contained in:
@@ -61,6 +61,9 @@ class Properties {
|
||||
static void set_provisioning_messages_are_binary(bool flag) {
|
||||
provisioning_messages_are_binary_ = flag;
|
||||
}
|
||||
static inline bool delay_oem_crypto_termination() {
|
||||
return delay_oem_crypto_termination_;
|
||||
}
|
||||
static bool GetCompanyName(std::string* company_name);
|
||||
static bool GetModelName(std::string* model_name);
|
||||
static bool GetArchitectureName(std::string* arch_name);
|
||||
@@ -147,6 +150,7 @@ class Properties {
|
||||
static bool allow_service_certificate_requests_;
|
||||
static bool device_files_is_a_real_filesystem_;
|
||||
static bool allow_restore_of_offline_licenses_with_release_;
|
||||
static bool delay_oem_crypto_termination_;
|
||||
static std::unique_ptr<CdmClientPropertySetMap> session_property_set_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(Properties);
|
||||
|
||||
@@ -21,6 +21,7 @@ bool Properties::provisioning_messages_are_binary_;
|
||||
bool Properties::allow_service_certificate_requests_;
|
||||
bool Properties::device_files_is_a_real_filesystem_;
|
||||
bool Properties::allow_restore_of_offline_licenses_with_release_;
|
||||
bool Properties::delay_oem_crypto_termination_;
|
||||
std::unique_ptr<CdmClientPropertySetMap> Properties::session_property_set_;
|
||||
|
||||
bool Properties::AddSessionPropertySet(const CdmSessionId& session_id,
|
||||
|
||||
@@ -39,6 +39,11 @@ const bool kDeviceFilesIsARealFileSystem = true;
|
||||
// will be treated as a release request. If false, a restoration will fail.
|
||||
const bool kAllowRestoreOfflineLicenseWithRelease = false;
|
||||
|
||||
// This controls whether an OEMCrypto_Terminate call is issued immediately
|
||||
// after crypto session count declines to 0 or if a termination is
|
||||
// delayed by a countdown timer. If false, termination is immediate.
|
||||
const bool kPropertyDelayOemCryptoTermination = true;
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // CDM_BASE_WV_PROPERTIES_CONFIGURATION_H_
|
||||
|
||||
@@ -52,6 +52,7 @@ void Properties::InitOnce() {
|
||||
device_files_is_a_real_filesystem_ = kDeviceFilesIsARealFileSystem;
|
||||
allow_restore_of_offline_licenses_with_release_ =
|
||||
kAllowRestoreOfflineLicenseWithRelease;
|
||||
delay_oem_crypto_termination_ = kPropertyDelayOemCryptoTermination;
|
||||
session_property_set_.reset(new CdmClientPropertySetMap());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user