Move offload config hidl usage from native to java

TetheringUtil JNI is too big that it statically linking hidl and its
dependency library. To remove these static libraries, calling hidl in java
directly instead of using JNI.

Bug: 148984662
Test: -build, flash, boot
      -manually ON/OFF tethering

Change-Id: Id5a9759eb453fddaf0c3b7a31da17224e35e963e
This commit is contained in:
markchien
2020-02-05 12:42:25 +08:00
parent b569cf369b
commit 547e168540
4 changed files with 127 additions and 133 deletions

View File

@@ -24,14 +24,6 @@ import java.net.SocketException;
* {@hide}
*/
public class TetheringUtils {
/**
* Offload management process need to know conntrack rules to support NAT, but it may not have
* permission to create netlink netfilter sockets. Create two netlink netfilter sockets and
* share them with offload management process.
*/
public static native boolean configOffload();
/**
* Configures a socket for receiving ICMPv6 router solicitations and sending advertisements.
* @param fd the socket's {@link FileDescriptor}.