Merge "Load JNI in all classes that have native methods." am: af97e51c01 am: ceafffa6c0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1581528 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I21f1af4785d1ee540ba6dea8416c2538e60a9228
This commit is contained in:
@@ -36,6 +36,10 @@ import java.util.Objects;
|
||||
* {@hide}
|
||||
*/
|
||||
public class TetheringUtils {
|
||||
static {
|
||||
System.loadLibrary("tetherutilsjni");
|
||||
}
|
||||
|
||||
public static final byte[] ALL_NODES = new byte[] {
|
||||
(byte) 0xff, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
|
||||
};
|
||||
|
||||
@@ -41,6 +41,10 @@ import java.util.function.BiConsumer;
|
||||
* @param <V> the value of the map.
|
||||
*/
|
||||
public class BpfMap<K extends Struct, V extends Struct> implements AutoCloseable {
|
||||
static {
|
||||
System.loadLibrary("tetherutilsjni");
|
||||
}
|
||||
|
||||
// Following definitions from kernel include/uapi/linux/bpf.h
|
||||
public static final int BPF_F_RDWR = 0;
|
||||
public static final int BPF_F_RDONLY = 1 << 3;
|
||||
|
||||
@@ -82,7 +82,6 @@ public class TetheringService extends Service {
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public Tethering makeTethering(TetheringDependencies deps) {
|
||||
System.loadLibrary("tetherutilsjni");
|
||||
return new Tethering(deps);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user