summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2019-04-25 13:32:22 -0700
committerMichael Plass <mplass@google.com>2019-08-15 09:13:31 -0700
commit78b5ba337c20d7c5efc9ac8ff32027b546ddade6 (patch)
tree65f85449c3ba7c73f0dbbe414bee436b9511876f /tests
parent6d52b6baa3d2b23f069d1db6a80dfb0c59356ea5 (diff)
Stop LOHS on ip config error
Stop the local-only hotspot when an IP configuration error occurs, after unregistering all of the LOHS clients. Bug: 110500524 Test: atest com.android.server.wifi.WifiServiceImplTest#testStopSoftApWhenIpConfigFailsWithClients Change-Id: If57ad891bb8be449ac1600246668ea273f8c4239
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
index 5bb420630..7623c6a1d 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -2416,6 +2416,22 @@ public class WifiServiceImplTest {
}
/**
+ * Verify that softap mode is stopped for tethering if we receive an update with an ip mode
+ * configuration error while LOHS clients are registered.
+ */
+ @Test
+ public void testStopSoftApWhenIpConfigFailsWithClients() throws Exception {
+ setupClientModeImplHandlerForPost();
+ registerLOHSRequestFull();
+
+ mWifiServiceImpl.updateInterfaceIpState(WIFI_IFACE_NAME, IFACE_IP_MODE_CONFIGURATION_ERROR);
+ mLooper.dispatchAll();
+
+ verify(mWifiController).sendMessage(eq(CMD_SET_AP), eq(0),
+ eq(WifiManager.IFACE_IP_MODE_TETHERED));
+ }
+
+ /**
* Verify that if a LOHS request is active and tethering starts, callers are notified on the
* incompatible mode and are unregistered.
*/