Revert^2 "Add isHidlSupported Java API"
109b135211ae030e8dd19ed79090cb29e55a7636 Change-Id: If68af33e95c33f8f8d9c7d66416c40bc5536a7c1
This commit is contained in:
parent
109b135211
commit
b480dead6a
@ -218,6 +218,13 @@ public class HidlSupport {
|
||||
@SystemApi
|
||||
public static native int getPidIfSharable();
|
||||
|
||||
/**
|
||||
* Return true if HIDL is supported on this device and false if not.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static native boolean isHidlSupported();
|
||||
|
||||
/** @hide */
|
||||
public HidlSupport() {}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#include <hidl/ServiceManagement.h>
|
||||
#include <nativehelper/JNIHelp.h>
|
||||
|
||||
#include "core_jni_helpers.h"
|
||||
@ -24,8 +25,13 @@ static jint android_os_HidlSupport_getPidIfSharable(JNIEnv*, jclass) {
|
||||
return android::hardware::details::getPidIfSharable();
|
||||
}
|
||||
|
||||
static jboolean android_os_HidlSupport_isHidlSupported(JNIEnv*, jclass) {
|
||||
return android::hardware::isHidlSupported();
|
||||
}
|
||||
|
||||
static const JNINativeMethod gHidlSupportMethods[] = {
|
||||
{"getPidIfSharable", "()I", (void*)android_os_HidlSupport_getPidIfSharable},
|
||||
{"getPidIfSharable", "()I", (void*)android_os_HidlSupport_getPidIfSharable},
|
||||
{"isHidlSupported", "()Z", (void*)android_os_HidlSupport_isHidlSupported},
|
||||
};
|
||||
|
||||
const char* const kHidlSupportPathName = "android/os/HidlSupport";
|
||||
|
Loading…
x
Reference in New Issue
Block a user