Replace ICryptoPlugin's detailed error message

It had been removed since it didn't appear to be needed,
but was found to be necessary for functionality.

Test: gtests pass

Change-Id: Ib716a04218e8d5c81f5d7889a53dfa17beccecef
related-to-bug: 32815560
diff --git a/drm/crypto/1.0/ICryptoPlugin.hal b/drm/crypto/1.0/ICryptoPlugin.hal
index e892e3c..2f7fd87 100644
--- a/drm/crypto/1.0/ICryptoPlugin.hal
+++ b/drm/crypto/1.0/ICryptoPlugin.hal
@@ -83,9 +83,12 @@
      * ERROR_DRM_SESSION_NOT_OPENED if the decrypt session is not opened, or
      * ERROR_DRM_CANNOT_HANDLE in other failure cases.
      * @return bytesWritten the number of bytes output from the decryption
+     * @return detailedError if the error is a vendor-specific error, the
+     * vendor's crypto HAL may provide a detailed error string to help
+     * describe the error.
      */
     decrypt(bool secure, uint8_t[16] keyId, uint8_t[16] iv, Mode mode,
         Pattern pattern, vec<SubSample> subSamples,
             memory source, DestinationBuffer destination)
-        generates(Status status, uint32_t bytesWritten);
+        generates(Status status, uint32_t bytesWritten, string detailedError);
 };
diff --git a/drm/crypto/1.0/default/CryptoPlugin.cpp b/drm/crypto/1.0/default/CryptoPlugin.cpp
index 7921852..9173d5b 100644
--- a/drm/crypto/1.0/default/CryptoPlugin.cpp
+++ b/drm/crypto/1.0/default/CryptoPlugin.cpp
@@ -119,7 +119,7 @@
             bytesWritten = 0;
         }
 
-        _hidl_cb(toStatus(status), bytesWritten);
+        _hidl_cb(toStatus(status), bytesWritten, detailMessage.c_str());
         return Void();
     }