MediaDrm jni: get exception logs only if necessary
Bug: 162255728 Test: MediaDrmTest#testGetLogMessages Change-Id: I39c203ff33dcc109120e9bbc1e089e6c8b7c90b3
This commit is contained in:
@@ -424,7 +424,7 @@ static bool isSessionException(status_t err) {
|
||||
static bool throwExceptionAsNecessary(
|
||||
JNIEnv *env, const sp<IDrm> &drm, status_t err, const char *msg = NULL) {
|
||||
std::string msgStr;
|
||||
if (drm != NULL) {
|
||||
if (drm != NULL && err != OK) {
|
||||
msgStr = DrmUtils::GetExceptionMessage(err, msg, drm);
|
||||
msg = msgStr.c_str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user