summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2018-02-21 14:54:04 -0800
committerErik Kline <ek@google.com>2018-02-21 15:10:01 -0800
commit36fd22bb9615a313c68c4f74427e7f8f357934b9 (patch)
tree781ff0cb8272d64b42d954d00bfec95bff89e8a7 /java
parent22d5a7067cc686f84aaed136b80c9491732af23f (diff)
downloadethernet-36fd22bb9615a313c68c4f74427e7f8f357934b9.tar.gz
This makes sure that we never accidentally have two IpClients vying for control of the same interface. Test: as follows - built - flashed - booted Bug: 62476366 Change-Id: Iab4ca7c2445e70b6f8beaf5dc6921cb0c6cd56ed
Diffstat (limited to 'java')
-rw-r--r--java/com/android/server/ethernet/EthernetNetworkFactory.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/java/com/android/server/ethernet/EthernetNetworkFactory.java b/java/com/android/server/ethernet/EthernetNetworkFactory.java
index d464879..f95500e 100644
--- a/java/com/android/server/ethernet/EthernetNetworkFactory.java
+++ b/java/com/android/server/ethernet/EthernetNetworkFactory.java
@@ -355,8 +355,10 @@ public class EthernetNetworkFactory extends NetworkFactory {
void stop() {
if (mIpClient != null) {
mIpClient.shutdown();
+ mIpClient.awaitShutdown();
mIpClient = null;
}
+
// ConnectivityService will only forget our NetworkAgent if we send it a NetworkInfo object
// with a state of DISCONNECTED or SUSPENDED. So we can't simply clear our NetworkInfo here:
// that sets the state to IDLE, and ConnectivityService will still think we're connected.