Correct reporting of errors in MediaCrypto
Legacy error codes need to be converted into new Status values before
being reported. Decryption errors (that were negative) were changed to
absolute values. This caused their translation to new Status values to
fail.
b/35634335
Test: Verified with GtsExoPlayerTestCases. Some failures, but those
are unrelated to this CL and will be addressed separately.
Change-Id: I995cac33cb2725d02b0f1a3922e522ce07a9d1be
diff --git a/drm/1.0/default/CryptoPlugin.cpp b/drm/1.0/default/CryptoPlugin.cpp
index 4a4171b..9c51b15 100644
--- a/drm/1.0/default/CryptoPlugin.cpp
+++ b/drm/1.0/default/CryptoPlugin.cpp
@@ -144,7 +144,7 @@
status = android::OK;
bytesWritten = result;
} else {
- status = -result;
+ status = result;
bytesWritten = 0;
}