summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2018-05-08 23:05:18 -0700
committerRebecca Silberstein <silberst@google.com>2018-05-09 11:24:03 -0700
commit5b63400e5624455eeb9ddb3fe8078e1bc5ebcd13 (patch)
treed48df02bf2a6074aa62d65e26c0d531eed4c6a88 /tests
parentfdd8945c3952dd368918e24c84028f19092fc663 (diff)
ClientModeManager: immediately clean up state onDestroyed
When onDestroyed is called in Client mode, make sure we immediately handle the network disconnect. This avoids a race in connectivity when dynamically switching between operating modes. Bug: 79400794 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Test: atest android.net.wifi.cts Test: manually toggled wifi tethering when wifi on and connected Test: manually toggled wifi tethering when wifi on and disconnected Test: manually toggled wifi tethering when wifi off and scan mode on Test: manually toggled wifi tethering when wifi fully disabled Change-Id: I848ba9b1f4a16687e48adb76513213a0906144c4
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeManagerTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeManagerTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeManagerTest.java
index fbdcb7ba3..b04caf54d 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeManagerTest.java
@@ -294,6 +294,7 @@ public class ClientModeManagerTest {
mInterfaceCallbackCaptor.getValue().onDestroyed(TEST_INTERFACE_NAME);
mLooper.dispatchAll();
verifyNotificationsForCleanShutdown(WIFI_STATE_ENABLED);
+ verify(mWifiStateMachine).handleIfaceDestroyed();
}
/**
@@ -318,5 +319,6 @@ public class ClientModeManagerTest {
mLooper.dispatchAll();
verifyNoMoreInteractions(mListener);
+ verify(mWifiStateMachine, never()).handleIfaceDestroyed();
}
}