Skip to content
Snippets Groups Projects
Commit ec3b1933 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Gerrit Code Review
Browse files

Merge "Check whether kernel is for X86 via JNI" into main

parents b1872c83 02f6124b
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment