Fixed RemoveAllUsageInfo returned error code.
[ Merge of http://go/wvgerrit/86444 ] When the CDM engine attemped to remove all usage information across both L1 and L3, a failure in L1 was being ignored if L3 removal succeeded. For this fix, L1 failure codes are prioritized over L3 failure codes (should both L1 and L3 fail). Bug: 141272019 Test: Linux unit test and Android unit tests Change-Id: I2df6d47a2a57c373c6c76903ab33ebbf649005b3
This commit is contained in:
@@ -1432,11 +1432,15 @@ CdmResponseType CdmEngine::RemoveAllUsageInfo(
|
||||
|
||||
CdmResponseType CdmEngine::RemoveAllUsageInfo(const std::string& app_id) {
|
||||
LOGI("Removing all usage info: app_id = %s", app_id.c_str());
|
||||
CdmResponseType status_l1, status_l3;
|
||||
status_l1 = status_l3 = NO_ERROR;
|
||||
status_l1 = RemoveAllUsageInfo(app_id, kSecurityLevelL1);
|
||||
status_l3 = RemoveAllUsageInfo(app_id, kSecurityLevelL3);
|
||||
return (status_l3 == NO_ERROR) ? status_l3 : status_l1;
|
||||
const CdmResponseType status_l1 =
|
||||
RemoveAllUsageInfo(app_id, kSecurityLevelL1);
|
||||
const CdmResponseType status_l3 =
|
||||
RemoveAllUsageInfo(app_id, kSecurityLevelL3);
|
||||
// Prioritizing L1 status.
|
||||
if (status_l1 != NO_ERROR) {
|
||||
return status_l1;
|
||||
}
|
||||
return status_l3;
|
||||
}
|
||||
|
||||
CdmResponseType CdmEngine::RemoveUsageInfo(
|
||||
|
||||
Reference in New Issue
Block a user