am 90988792: OEMCrypto_DeleteUsageTable now returns OEMCrypto_SUCCESS
* commit '909887923d395f23c0356607da32ac93b73d6e5a': OEMCrypto_DeleteUsageTable now returns OEMCrypto_SUCCESS
This commit is contained in:
@@ -1277,10 +1277,8 @@ OEMCryptoResult OEMCrypto_DeleteUsageTable() {
|
||||
if (LogCategoryEnabled(kLoggingTraceOEMCryptoCalls)) {
|
||||
LOGI("-- OEMCryptoResult OEMCrypto_DeleteUsageTable()\n");
|
||||
}
|
||||
if (crypto_engine->usage_table()->Clear()) {
|
||||
return OEMCrypto_SUCCESS;
|
||||
}
|
||||
return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
crypto_engine->usage_table()->Clear();
|
||||
return OEMCrypto_SUCCESS;
|
||||
}
|
||||
|
||||
}; // namespace wvoec_mock
|
||||
|
||||
@@ -406,13 +406,12 @@ bool UsageTable::DeleteEntry(const std::vector<uint8_t> &pst) {
|
||||
return SaveToFile();
|
||||
}
|
||||
|
||||
bool UsageTable::Clear() {
|
||||
void UsageTable::Clear() {
|
||||
wvcdm::AutoLock lock(lock_);
|
||||
for (EntryMap::iterator i = table_.begin(); i != table_.end(); ++i) {
|
||||
if (i->second) delete i->second;
|
||||
}
|
||||
table_.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UsageTable::ComputeHash(const std::vector<uint8_t> &pst,
|
||||
|
||||
@@ -86,7 +86,7 @@ class UsageTable {
|
||||
OEMCryptoResult UpdateTable();
|
||||
OEMCryptoResult DeactivateEntry(const std::vector<uint8_t> &pst);
|
||||
bool DeleteEntry(const std::vector<uint8_t> &pst);
|
||||
bool Clear();
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
UsageTableEntry *FindEntryLocked(const std::vector<uint8_t> &pst);
|
||||
|
||||
Reference in New Issue
Block a user