Merge "Check whether kernel is for X86 via JNI" into main
This commit is contained in:
commit
ec3b193377
2 changed files with 8 additions and 0 deletions
|
|
@ -255,6 +255,10 @@ static jboolean android_net_utils_isKernel64Bit(JNIEnv *env, jclass clazz) {
|
|||
return bpf::isKernel64Bit();
|
||||
}
|
||||
|
||||
static jboolean android_net_utils_isKernelX86(JNIEnv *env, jclass clazz) {
|
||||
return bpf::isX86();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
|
|
@ -278,6 +282,7 @@ static const JNINativeMethod gNetworkUtilMethods[] = {
|
|||
{ "setsockoptBytes", "(Ljava/io/FileDescriptor;II[B)V",
|
||||
(void*) android_net_utils_setsockoptBytes},
|
||||
{ "isKernel64Bit", "()Z", (void*) android_net_utils_isKernel64Bit },
|
||||
{ "isKernelX86", "()Z", (void*) android_net_utils_isKernelX86 },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
|
|
|||
|
|
@ -440,4 +440,7 @@ public class NetworkUtils {
|
|||
|
||||
/** Returns whether the Linux Kernel is 64 bit */
|
||||
public static native boolean isKernel64Bit();
|
||||
|
||||
/** Returns whether the Linux Kernel is x86 */
|
||||
public static native boolean isKernelX86();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue