Merge "Clarify decrypt error detail messages" into mnc-dev
This commit is contained in:
@@ -177,9 +177,12 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
|||||||
if (!isCdmResponseTypeSuccess(res)) {
|
if (!isCdmResponseTypeSuccess(res)) {
|
||||||
ALOGE("Decrypt error result in session %s during unencrypted block: %d",
|
ALOGE("Decrypt error result in session %s during unencrypted block: %d",
|
||||||
mSessionId.c_str(), res);
|
mSessionId.c_str(), res);
|
||||||
errorDetailMsg->setTo("Error decrypting data.");
|
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES) {
|
||||||
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES ||
|
errorDetailMsg->setTo("Error decrypting data: insufficient crypto resources");
|
||||||
res == wvcdm::NEED_KEY) {
|
// This error is actionable by the app and should be passed up.
|
||||||
|
return mapCdmResponseType(res);
|
||||||
|
} else if (res == wvcdm::NEED_KEY) {
|
||||||
|
errorDetailMsg->setTo("Error decrypting data: requested key has not been loaded");
|
||||||
// This error is actionable by the app and should be passed up.
|
// This error is actionable by the app and should be passed up.
|
||||||
return mapCdmResponseType(res);
|
return mapCdmResponseType(res);
|
||||||
} else {
|
} else {
|
||||||
@@ -207,9 +210,12 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE],
|
|||||||
if (!isCdmResponseTypeSuccess(res)) {
|
if (!isCdmResponseTypeSuccess(res)) {
|
||||||
ALOGE("Decrypt error result in session %s during encrypted block: %d",
|
ALOGE("Decrypt error result in session %s during encrypted block: %d",
|
||||||
mSessionId.c_str(), res);
|
mSessionId.c_str(), res);
|
||||||
errorDetailMsg->setTo("Error decrypting data.");
|
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES) {
|
||||||
if (res == wvcdm::INSUFFICIENT_CRYPTO_RESOURCES ||
|
errorDetailMsg->setTo("Error decrypting data: insufficient crypto resources");
|
||||||
res == wvcdm::NEED_KEY) {
|
// This error is actionable by the app and should be passed up.
|
||||||
|
return mapCdmResponseType(res);
|
||||||
|
} else if (res == wvcdm::NEED_KEY) {
|
||||||
|
errorDetailMsg->setTo("Error decrypting data: requested key has not been loaded");
|
||||||
// This error is actionable by the app and should be passed up.
|
// This error is actionable by the app and should be passed up.
|
||||||
return mapCdmResponseType(res);
|
return mapCdmResponseType(res);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user