summaryrefslogtreecommitdiff
path: root/src/com/android/server/NetworkStackService.java
diff options
context:
space:
mode:
authorXiao Ma <xiaom@google.com>2020-04-28 04:15:07 +0000
committerXiao Ma <xiaom@google.com>2020-05-18 14:54:53 +0000
commit1f20cb6617d30e0f6a788a29ba1827881c09b3b8 (patch)
tree6341c200eb04a25f14a1736afb9ac5a491eada0b /src/com/android/server/NetworkStackService.java
parent38dc83450b4626c9ab072867dcefb89501b45efa (diff)
Refactor DHCP server with StateMachine.
To support DHCPDECLINE message and request a new prefix from IpServer, a WaitState is required to wait until IpServer allocates a different prefix and completes configuring this prefix/route. Then server could resume from pausing DHCP packets listening. From this point, StateMachine is easier to add a WaitState for implementation. Refactor DHCP server by replacing ThreadHandler with StateMachine first. Bug: 130741856 Test: atest NetworkStackTests NetworkStackNextTests Test: manual test: connect wifi, turn on hotspot, downstream device attaches to hotspot successfully, then turn off hotspot, repeat multiple times. Merged-In: I6c09d9c371e9c4e71d8ba26adaed640e3b97437b Change-Id: I6c09d9c371e9c4e71d8ba26adaed640e3b97437b
Diffstat (limited to 'src/com/android/server/NetworkStackService.java')
-rw-r--r--src/com/android/server/NetworkStackService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/server/NetworkStackService.java b/src/com/android/server/NetworkStackService.java
index 5de5837..8710e67 100644
--- a/src/com/android/server/NetworkStackService.java
+++ b/src/com/android/server/NetworkStackService.java
@@ -356,7 +356,7 @@ public class NetworkStackService extends Service {
cb.onDhcpServerCreated(STATUS_UNKNOWN_ERROR, null);
return;
}
- cb.onDhcpServerCreated(STATUS_SUCCESS, server);
+ cb.onDhcpServerCreated(STATUS_SUCCESS, server.makeConnector());
}
@Override