diff options
author | Xiao Ma <xiaom@google.com> | 2019-12-09 10:23:32 +0900 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2019-12-20 12:47:23 +0900 |
commit | 7b60bfa137ad7ec9213ec4c2169cea4f303e2ce0 (patch) | |
tree | 20fb56f304b65d06bc455bbcab5d7470123388a4 /src/android/net/ip/IpClient.java | |
parent | 3651e21c4c9dffad56f63b4bd5db8be0565d7170 (diff) |
Add more integration test cases (timeout/abort/success) for DHCP FILS.
- receiving CMD_TIMEOUT before aborting FILS process.
- receiving CMD_TIMEOUT after aborting FILS process.
- receiving CMD_TIMEOUT before success FILS process.
- receiving CMD_TIMEOUT after success FILS process.
Bug: 140223017
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: I519bf2fdda38cb9666f769868379a0c044356db0
Diffstat (limited to 'src/android/net/ip/IpClient.java')
-rw-r--r-- | src/android/net/ip/IpClient.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/android/net/ip/IpClient.java b/src/android/net/ip/IpClient.java index 8e95ab5..2fb73a0 100644 --- a/src/android/net/ip/IpClient.java +++ b/src/android/net/ip/IpClient.java @@ -39,7 +39,6 @@ import android.net.TcpKeepalivePacketDataParcelable; import android.net.apf.ApfCapabilities; import android.net.apf.ApfFilter; import android.net.dhcp.DhcpClient; -import android.net.dhcp.DhcpClient.Configuration; import android.net.metrics.IpConnectivityLog; import android.net.metrics.IpManagerEvent; import android.net.shared.InitialConfiguration; @@ -478,6 +477,14 @@ public class IpClient extends StateMachine { } /** + * Get a DhcpClient instance. + */ + public DhcpClient makeDhcpClient(Context context, StateMachine controller, + InterfaceParams ifParams, DhcpClient.Dependencies deps) { + return DhcpClient.makeDhcpClient(context, controller, ifParams, deps); + } + + /** * Get a DhcpClient Dependencies instance. */ public DhcpClient.Dependencies getDhcpClientDependencies( @@ -1518,7 +1525,7 @@ public class IpClient extends StateMachine { private void startDhcpClient() { // Start DHCPv4. - mDhcpClient = DhcpClient.makeDhcpClient(mContext, IpClient.this, mInterfaceParams, + mDhcpClient = mDependencies.makeDhcpClient(mContext, IpClient.this, mInterfaceParams, mDependencies.getDhcpClientDependencies(mIpMemoryStore)); // If preconnection is enabled, there is no need to ask Wi-Fi to disable powersaving @@ -1527,7 +1534,7 @@ public class IpClient extends StateMachine { // registerForPreDhcpNotification is called later when processing the CMD_*_PRECONNECTION // messages. if (!isUsingPreconnection()) mDhcpClient.registerForPreDhcpNotification(); - mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP, new Configuration(mL2Key, + mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP, new DhcpClient.Configuration(mL2Key, isUsingPreconnection())); } |