noop - fix 'jobject -> jclass' in native jni code signature.

These are static methods, see: frameworks/base/core/java/com/android/internal/net/NetworkUtilsInternal.java

  public static native void setAllowNetworkingForProcess(boolean allowNetworking);
  public static native boolean protectFromVpn(FileDescriptor fd);
  public static native boolean protectFromVpn(int socketfd);

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibac6e7b864823cc94bb5301d47bf244b9dd6bdad
This commit is contained in:
Maciej Żenczykowski
2022-07-12 05:23:38 +00:00
parent 7ec1c694b5
commit eabe05581f

View File

@@ -21,17 +21,17 @@
#include "jni.h"
namespace android {
static void android_net_utils_setAllowNetworkingForProcess(JNIEnv *env, jobject thiz,
static void android_net_utils_setAllowNetworkingForProcess(JNIEnv *env, jclass clazz,
jboolean hasConnectivity) {
setAllowNetworkingForProcess(hasConnectivity == JNI_TRUE);
}
static jboolean android_net_utils_protectFromVpn(JNIEnv *env, jobject thiz, jint socket) {
static jboolean android_net_utils_protectFromVpn(JNIEnv *env, jclass clazz, jint socket) {
return (jboolean)!protectFromVpn(socket);
}
static jboolean android_net_utils_protectFromVpnWithFd(JNIEnv *env, jobject thiz, jobject javaFd) {
return android_net_utils_protectFromVpn(env, thiz, AFileDescriptor_getFd(env, javaFd));
static jboolean android_net_utils_protectFromVpnWithFd(JNIEnv *env, jclass clazz, jobject javaFd) {
return android_net_utils_protectFromVpn(env, clazz, AFileDescriptor_getFd(env, javaFd));
}
static const JNINativeMethod gNetworkUtilMethods[] = {