summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2018-05-11 20:31:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-11 20:31:53 +0000
commitac532d206250b85a6a605ded31d5b1439d829112 (patch)
tree2a8021039de80c9e80b77034e432d4d38c2a8c7f /tests
parentf9f970b1fa45d917adb3ff7bac12cf1c1e06bb8f (diff)
parentab00689b004ddb2594492d50406fb61a3f1bf8b9 (diff)
Merge "WifiServiceImpl: stop softap when ip config fails" into pi-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java14
1 files changed, 14 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 46b29a46b..102ebca15 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -2013,6 +2013,8 @@ public class WifiServiceImplTest {
assertEquals(HOTSPOT_FAILED, message.what);
assertEquals(ERROR_GENERIC, message.arg1);
+ verify(mWifiController, never()).sendMessage(eq(CMD_SET_AP), eq(0), eq(0));
+
// sendMessage should only happen once since the requestor should be unregistered
reset(mHandler);
@@ -2024,6 +2026,18 @@ public class WifiServiceImplTest {
}
/**
+ * Verify that softap mode is stopped for tethering if we receive an update with an ip mode
+ * configuration error.
+ */
+ @Test
+ public void testStopSoftApWhenIpConfigFails() throws Exception {
+ mWifiServiceImpl.updateInterfaceIpState(WIFI_IFACE_NAME, IFACE_IP_MODE_CONFIGURATION_ERROR);
+ mLooper.dispatchAll();
+
+ verify(mWifiController).sendMessage(eq(CMD_SET_AP), eq(0), eq(0));
+ }
+
+ /**
* Verify that if a LOHS request is active and tethering starts, callers are notified on the
* incompatible mode and are unregistered.
*/