Allow propagation of error information and description from the CryptoPlugin to

the higher layers.

Change-Id: I9f434ad55cdf575803c208bedf47b607baff2330
related-to-bug: 6365261
diff --git a/media/libmediaplayerservice/Crypto.cpp b/media/libmediaplayerservice/Crypto.cpp
index 574ae71..d35d5b1 100644
--- a/media/libmediaplayerservice/Crypto.cpp
+++ b/media/libmediaplayerservice/Crypto.cpp
@@ -22,6 +22,7 @@
 
 #include <media/hardware/CryptoAPI.h>
 #include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/AString.h>
 #include <media/stagefright/foundation/hexdump.h>
 #include <media/stagefright/MediaErrors.h>
 
@@ -147,7 +148,8 @@
         CryptoPlugin::Mode mode,
         const void *srcPtr,
         const CryptoPlugin::SubSample *subSamples, size_t numSubSamples,
-        void *dstPtr) {
+        void *dstPtr,
+        AString *errorDetailMsg) {
     Mutex::Autolock autoLock(mLock);
 
     if (mInitCheck != OK) {
@@ -159,7 +161,8 @@
     }
 
     return mPlugin->decrypt(
-            secure, key, iv, mode, srcPtr, subSamples, numSubSamples, dstPtr);
+            secure, key, iv, mode, srcPtr, subSamples, numSubSamples, dstPtr,
+            errorDetailMsg);
 }
 
 }  // namespace android
diff --git a/media/libmediaplayerservice/Crypto.h b/media/libmediaplayerservice/Crypto.h
index 74de2b5..c5aa3c6 100644
--- a/media/libmediaplayerservice/Crypto.h
+++ b/media/libmediaplayerservice/Crypto.h
@@ -49,7 +49,8 @@
             CryptoPlugin::Mode mode,
             const void *srcPtr,
             const CryptoPlugin::SubSample *subSamples, size_t numSubSamples,
-            void *dstPtr);
+            void *dstPtr,
+            AString *errorDetailMsg);
 
 private:
     mutable Mutex mLock;