Remove TODO logs from dynamic adapter am: ee283ec61c
am: e76930cf14
Change-Id: Id4f6c9cd0dc8f303e11609b2530ec288764ac0e6
This commit is contained in:
@@ -1532,9 +1532,6 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
|||||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||||
LevelSession pair = kAdapter->get(session);
|
LevelSession pair = kAdapter->get(session);
|
||||||
if (!pair.fcn) {
|
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* fcn1 = kAdapter->get(kLevelDefault);
|
||||||
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
|
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
|
||||||
OEMCryptoResult sts = OEMCrypto_ERROR_INVALID_SESSION;
|
OEMCryptoResult sts = OEMCrypto_ERROR_INVALID_SESSION;
|
||||||
@@ -1542,14 +1539,10 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
|||||||
if (fcn1->version < 13) {
|
if (fcn1->version < 13) {
|
||||||
if (fcn1->DeactivateUsageEntry_V12) {
|
if (fcn1->DeactivateUsageEntry_V12) {
|
||||||
sts = fcn1->DeactivateUsageEntry_V12(pst, pst_length);
|
sts = fcn1->DeactivateUsageEntry_V12(pst, pst_length);
|
||||||
} else {
|
|
||||||
LOGE("TODO(fredgc): Fred screwed up temporary code for v12!\n");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fcn1->DeactivateUsageEntry) {
|
if (fcn1->DeactivateUsageEntry) {
|
||||||
sts = fcn1->DeactivateUsageEntry(0, pst, pst_length);
|
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->version < 13) {
|
||||||
if (fcn3->DeactivateUsageEntry_V12) {
|
if (fcn3->DeactivateUsageEntry_V12) {
|
||||||
sts = fcn3->DeactivateUsageEntry_V12(pst, pst_length);
|
sts = fcn3->DeactivateUsageEntry_V12(pst, pst_length);
|
||||||
} else {
|
|
||||||
LOGE("TODO(fredgc): Fred screwed up temporary code for L3 v12!\n");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fcn3->DeactivateUsageEntry) {
|
if (fcn3->DeactivateUsageEntry) {
|
||||||
sts = fcn3->DeactivateUsageEntry(0, pst, pst_length);
|
sts = fcn3->DeactivateUsageEntry(0, pst, pst_length);
|
||||||
} else {
|
|
||||||
LOGE("TODO(fredgc): Fred screwed up temporary code for L3 v13!\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sts;
|
return sts;
|
||||||
// All of the hacky code above should be removed once the unit tests and
|
// TODO(fredgc): All of the code above should be removed once the
|
||||||
// cdm codde use the new deactivate usage entry.
|
// unit tests and cdm code use the new deactivate usage entry.
|
||||||
}
|
}
|
||||||
if (pair.fcn->version < 9) {
|
if (pair.fcn->version < 9) {
|
||||||
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
|
||||||
@@ -1581,14 +1570,13 @@ extern "C" OEMCryptoResult OEMCrypto_DeactivateUsageEntry(
|
|||||||
if (pair.fcn->DeactivateUsageEntry_V12) {
|
if (pair.fcn->DeactivateUsageEntry_V12) {
|
||||||
return pair.fcn->DeactivateUsageEntry_V12(pst, pst_length);
|
return pair.fcn->DeactivateUsageEntry_V12(pst, pst_length);
|
||||||
} else {
|
} else {
|
||||||
LOGE("TODO(fredgc): problem picking function!\n");
|
|
||||||
return OEMCrypto_ERROR_INVALID_SESSION;
|
return OEMCrypto_ERROR_INVALID_SESSION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Session's OEMCrypto is v13 or greater.
|
||||||
if (pair.fcn->DeactivateUsageEntry) {
|
if (pair.fcn->DeactivateUsageEntry) {
|
||||||
return pair.fcn->DeactivateUsageEntry(pair.session, pst, pst_length);
|
return pair.fcn->DeactivateUsageEntry(pair.session, pst, pst_length);
|
||||||
} else {
|
} else {
|
||||||
LOGE("TODO(fredgc): problem picking function!\n");
|
|
||||||
return OEMCrypto_ERROR_INVALID_SESSION;
|
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,
|
OEMCrypto_SESSION session, const uint8_t* pst, size_t pst_length,
|
||||||
const uint8_t* message, size_t message_length, const uint8_t* signature,
|
const uint8_t* message, size_t message_length, const uint8_t* signature,
|
||||||
size_t signature_length) {
|
size_t signature_length) {
|
||||||
LOGE("TODO(fredgc): remove DeleteUsageEntry.");
|
|
||||||
|
|
||||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||||
LevelSession pair = kAdapter->get(session);
|
LevelSession pair = kAdapter->get(session);
|
||||||
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_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,
|
extern "C" OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(const uint8_t* pst,
|
||||||
size_t pst_length) {
|
size_t pst_length) {
|
||||||
LOGE("TODO(fredgc): remove ForceDeleteUsageEntry.");
|
|
||||||
|
|
||||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||||
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
|
const FunctionPointers* fcn1 = kAdapter->get(kLevelDefault);
|
||||||
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
|
const FunctionPointers* fcn3 = kAdapter->get(kLevel3);
|
||||||
|
|||||||
Reference in New Issue
Block a user