Clean up some compiler warnings
This is a cherry pick of http://go/wvgerrit/13665 Added a few static casts and removed some unused parameters. Change-Id: I4f2d1c26580a188de429defc8d1d22757f4c6917
This commit is contained in:
@@ -355,27 +355,22 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParameters& params) {
|
||||
|
||||
CdmResponseType status = crypto_session_->Decrypt(params);
|
||||
|
||||
switch (status) {
|
||||
case NO_ERROR: {
|
||||
if (is_initial_decryption_) {
|
||||
policy_engine_->BeginDecryption();
|
||||
is_initial_decryption_ = false;
|
||||
}
|
||||
has_decrypted_since_last_report_ = true;
|
||||
if (!is_usage_update_needed_) {
|
||||
is_usage_update_needed_ =
|
||||
!license_parser_->provider_session_token().empty();
|
||||
}
|
||||
break;
|
||||
if (status == NO_ERROR) {
|
||||
if (is_initial_decryption_) {
|
||||
policy_engine_->BeginDecryption();
|
||||
is_initial_decryption_ = false;
|
||||
}
|
||||
case UNKNOWN_ERROR: {
|
||||
Clock clock;
|
||||
int64_t current_time = clock.GetCurrentTime();
|
||||
if (policy_engine_->IsLicenseDurationExpired(current_time) ||
|
||||
policy_engine_->IsPlaybackDurationExpired(current_time)) {
|
||||
return NEED_KEY;
|
||||
}
|
||||
break;
|
||||
has_decrypted_since_last_report_ = true;
|
||||
if (!is_usage_update_needed_) {
|
||||
is_usage_update_needed_ =
|
||||
!license_parser_->provider_session_token().empty();
|
||||
}
|
||||
} else {
|
||||
Clock clock;
|
||||
int64_t current_time = clock.GetCurrentTime();
|
||||
if (policy_engine_->IsLicenseDurationExpired(current_time) ||
|
||||
policy_engine_->IsPlaybackDurationExpired(current_time)) {
|
||||
return NEED_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user