diff options
author | Roshan Pius <rpius@google.com> | 2018-08-08 21:27:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-08-08 21:27:30 +0000 |
commit | 9f3a4b778063c49eda3847e6692e9444b0ff865b (patch) | |
tree | d1f5be5e7031db6671d09e53bee3b3e15dbc2c0d /tests | |
parent | 3880da181c0662780c6cd85f7b4bd4f2ba7aa209 (diff) | |
parent | c85e8813b449fc339c9bf775de044ce78190c908 (diff) |
Merge "WifiController: Enable softap toggle in airplane mode"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java index f40875624..f07a256a4 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java @@ -829,6 +829,25 @@ public class WifiControllerTest { } /** + * Toggling softap mode when in airplane mode needs to enable softap + */ + @Test + public void testSoftApModeToggleWhenInAirplaneMode() throws Exception { + // Test with airplane mode turned on: + when(mSettingsStore.isAirplaneModeOn()).thenReturn(true); + + // Turn on SoftAp. + mWifiController.sendMessage(CMD_SET_AP, 1); + mLooper.dispatchAll(); + verify(mActiveModeWarden).enterSoftAPMode(any()); + + // Turn off SoftAp. + mWifiController.sendMessage(CMD_SET_AP, 0); + mLooper.dispatchAll(); + verify(mActiveModeWarden).stopSoftAPMode(); + } + + /** * Toggling off scan mode when in ECM does not induce a mode change */ @Test @@ -850,6 +869,7 @@ public class WifiControllerTest { verifyNoMoreInteractions(mActiveModeWarden); } + /** * Toggling off client mode when in ECM does not induce a mode change */ |