summaryrefslogtreecommitdiff
path: root/src/android/net/dhcp/DhcpServer.java
diff options
context:
space:
mode:
authorpaulhu <paulhu@google.com>2019-03-29 17:22:20 +0800
committerpaulhu <paulhu@google.com>2019-04-03 17:49:36 +0800
commite455e2a1982365a52e2c93b37469650c2a2e79be (patch)
tree52c997fd9b106afc329c93e55370c206befe3f07 /src/android/net/dhcp/DhcpServer.java
parent5982efffc8d98fcadbbfa61a3f382526174a2bc6 (diff)
Move attach*Filter() and addArpEntry() methods to NetworkStack
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods were added there because they could not be added as JNI inside the NetworkStack. This was not possible because on Go devices, the NetworkStack was a jar library. But now, Go also uses an APK. Hence, move these methods to the NetworkStack. Change-Id: I1d88a0f0be23f2b15d5103fa092b9bf982329d7c Fix: 129433183 Test: atest NetworkStackTests FrameworksNetTests
Diffstat (limited to 'src/android/net/dhcp/DhcpServer.java')
-rw-r--r--src/android/net/dhcp/DhcpServer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/net/dhcp/DhcpServer.java b/src/android/net/dhcp/DhcpServer.java
index cd993e9..8832eaa 100644
--- a/src/android/net/dhcp/DhcpServer.java
+++ b/src/android/net/dhcp/DhcpServer.java
@@ -45,6 +45,7 @@ import android.annotation.Nullable;
import android.net.INetworkStackStatusCallback;
import android.net.MacAddress;
import android.net.TrafficStats;
+import android.net.util.NetworkStackUtils;
import android.net.util.SharedLog;
import android.net.util.SocketUtils;
import android.os.Handler;
@@ -207,7 +208,7 @@ public class DhcpServer extends IDhcpServer.Stub {
@Override
public void addArpEntry(@NonNull Inet4Address ipv4Addr, @NonNull MacAddress ethAddr,
@NonNull String ifname, @NonNull FileDescriptor fd) throws IOException {
- SocketUtils.addArpEntry(ipv4Addr, ethAddr, ifname, fd);
+ NetworkStackUtils.addArpEntry(ipv4Addr, ethAddr, ifname, fd);
}
@Override