Remove TODO logs from dynamic adapter
Merge from Widevine repo of http://go/wvgerrit/26943 b/37987506 Test: built and run unit tests on sailfish -- no new failures. Ran Netflix on sailfish. Change-Id: I96f8bb7a5c060fefd116b165406ce6bfad29f59d
This commit is contained in:
@@ -1532,9 +1532,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
LevelSession pair = kAdapter->get(session);
|
||||
if (!pair.fcn) {
|
||||
// TODO(fredgc): remove before flight!
|
||||
// return OEMCrypto_ERROR_INVALID_SESSION;
|
||||
LOGE("TODO(fredgc): remove temporary DeactivateUsageEntry.");
|
||||
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
|
||||
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
|
||||
OEMCryptoResult sts = OEMCrypto_ERROR_INVALID_SESSION;
|
||||
@@ -1542,14 +1539,10 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
||||
if (fcn1->version < 13) {
|
||||
if (fcn1->DeactivateUsageEntry_V12) {
|
||||
sts = fcn1->DeactivateUsageEntry_V12(pst, pst_length);
|
||||
} else {
|
||||
LOGE("TODO(fredgc): Fred screwed up temporary code for v12!\n");
|
||||
}
|
||||
} else {
|
||||
if (fcn1->DeactivateUsageEntry) {
|
||||
sts = fcn1->DeactivateUsageEntry(0, pst, pst_length);
|
||||
} else {
|
||||
LOGE("TODO(fredgc): Fred screwed up temporary code for v13!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1558,21 +1551,17 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
||||
if (fcn3->version < 13) {
|
||||
if (fcn3->DeactivateUsageEntry_V12) {
|
||||
sts = fcn3->DeactivateUsageEntry_V12(pst, pst_length);
|
||||
} else {
|
||||
LOGE("TODO(fredgc): Fred screwed up temporary code for L3 v12!\n");
|
||||
}
|
||||
} else {
|
||||
if (fcn3->DeactivateUsageEntry) {
|
||||
sts = fcn3->DeactivateUsageEntry(0, pst, pst_length);
|
||||
} else {
|
||||
LOGE("TODO(fredgc): Fred screwed up temporary code for L3 v13!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sts;
|
||||
// All of the hacky code above should be removed once the unit tests and
|
||||
// cdm codde use the new deactivate usage entry.
|
||||
// TODO(fredgc): All of the code above should be removed once the
|
||||
// unit tests and cdm code use the new deactivate usage entry.
|
||||
}
|
||||
if (pair.fcn->version < 9) {
|
||||
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
||||
@@ -1581,14 +1570,13 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
||||
if (pair.fcn->DeactivateUsageEntry_V12) {
|
||||
return pair.fcn->DeactivateUsageEntry_V12(pst, pst_length);
|
||||
} else {
|
||||
LOGE("TODO(fredgc): problem picking function!\n");
|
||||
return OEMCrypto_ERROR_INVALID_SESSION;
|
||||
}
|
||||
}
|
||||
// Session's OEMCrypto is v13 or greater.
|
||||
if (pair.fcn->DeactivateUsageEntry) {
|
||||
return pair.fcn->DeactivateUsageEntry(pair.session, pst, pst_length);
|
||||
} else {
|
||||
LOGE("TODO(fredgc): problem picking function!\n");
|
||||
return OEMCrypto_ERROR_INVALID_SESSION;
|
||||
}
|
||||
}
|
||||
@@ -1614,8 +1602,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageEntry(
|
||||
OEMCrypto_SESSION session, const uint8_t* pst, size_t pst_length,
|
||||
const uint8_t* message, size_t message_length, const uint8_t* signature,
|
||||
size_t signature_length) {
|
||||
LOGE("TODO(fredgc): remove DeleteUsageEntry.");
|
||||
|
||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
LevelSession pair = kAdapter->get(session);
|
||||
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
|
||||
@@ -1630,8 +1616,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageEntry(
|
||||
|
||||
extern "C" OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(const uint8_t* pst,
|
||||
size_t pst_length) {
|
||||
LOGE("TODO(fredgc): remove ForceDeleteUsageEntry.");
|
||||
|
||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
|
||||
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
|
||||
|
||||
Reference in New Issue
Block a user