Merge "Clean Up Warnings in Android Glue Code"

This commit is contained in:
TreeHugger Robot
2017-03-23 19:52:49 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 16 deletions

View File

@@ -313,18 +313,7 @@ Return<void> WVCryptoPlugin::decrypt(
}
}
uint32_t status;
uint32_t bytesWritten;
if (bufferOffset >= 0) {
status = android::OK;
bytesWritten = bufferOffset;
} else {
status = bufferOffset;
bytesWritten = 0;
}
_hidl_cb(toStatus(status), bytesWritten, errorDetailMsg.c_str());
_hidl_cb(Status::OK, bufferOffset, errorDetailMsg.c_str());
return Void();
}

View File

@@ -256,7 +256,7 @@ TEST_F(WVCryptoPluginTest, AttemptsToDecrypt) {
}
WVCryptoPlugin plugin(sessionId, kSessionIdSize, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res = plugin.decrypt(false, keyId, iv[0], CryptoPlugin::kMode_AES_CTR,
@@ -310,7 +310,7 @@ TEST_F(WVCryptoPluginTest, CommunicatesSecureBufferRequest) {
}
WVCryptoPlugin plugin(sessionId, kSessionIdSize, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res = plugin.decrypt(false, keyId, iv, CryptoPlugin::kMode_AES_CTR,
@@ -385,7 +385,7 @@ TEST_F(WVCryptoPluginTest, SetsFlagsForMinimumSubsampleRuns) {
}
WVCryptoPlugin plugin(sessionId, kSessionIdSize, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res = plugin.decrypt(false, keyId, iv, CryptoPlugin::kMode_AES_CTR,
@@ -461,7 +461,7 @@ TEST_F(WVCryptoPluginTest, AllowsSessionIdChanges) {
uint8_t blank[1]; // Some compilers will not accept 0.
WVCryptoPlugin plugin(blank, 0, cdm.get());
android::CryptoPlugin::Pattern noPattern = {0};
android::CryptoPlugin::Pattern noPattern = { 0, 0 };
AString errorDetailMessage;
ssize_t res;