Change testClearKeyGetKeyRequest jni to check aidl version property

Bug: 219395523
Test: CtsMediaDrmTestCases
Change-Id: Ic10f7fc02d6ee8d4f5ed963b64c472b758b513d2
diff --git a/tests/tests/media/drmframework/jni/native-mediadrm-jni.cpp b/tests/tests/media/drmframework/jni/native-mediadrm-jni.cpp
index 40584b6..630c7f6 100644
--- a/tests/tests/media/drmframework/jni/native-mediadrm-jni.cpp
+++ b/tests/tests/media/drmframework/jni/native-mediadrm-jni.cpp
@@ -27,7 +27,6 @@
 #include <jni.h>
 #include <nativehelper/JNIHelp.h>
 #include <sys/stat.h>
-
 #include <android/native_window_jni.h>
 
 #include "AMediaObjects.h"
@@ -1041,6 +1040,17 @@
             return JNI_FALSE;
     }
 
+    // Check service availability
+    const char *outValue = NULL;
+    status = AMediaDrm_getPropertyString(aMediaObjects.getDrm(),
+            "aidlVersion", &outValue);
+    if (status != AMEDIA_OK) {
+        // Drm service not using aidl interface, skip checking default url value
+        return JNI_TRUE;
+    }
+
+    ALOGD("aidlVersion is [%s]", outValue);
+
     ALOGD("kDefaultUrl [%s], length %d, defaultUrl [%s], length %d",
         kDefaultUrl,
         (int)strlen(kDefaultUrl),