Merge "Load JNI in all classes that have native methods."
This commit is contained in:
commit
af97e51c01
3 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue