Loading src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ public class WifiTetherApBandPreferenceController extends WifiTetherBasePreferen private boolean is5GhzBandSupported() { final String countryCode = mWifiManager.getCountryCode(); if (!mWifiManager.isDualBandSupported() || countryCode == null) { if (!mWifiManager.is5GHzBandSupported() || countryCode == null) { return false; } return true; Loading tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java +7 −7 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void display_5GhzSupported_shouldDisplayFullList() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); when(mWifiManager.isDualModeSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -94,7 +94,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void display_noCountryCode_shouldDisable() { when(mWifiManager.getCountryCode()).thenReturn(null); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -106,7 +106,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void display_5GhzNotSupported_shouldDisable() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(false); when(mWifiManager.is5GHzBandSupported()).thenReturn(false); mController.displayPreference(mScreen); Loading @@ -118,7 +118,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void changePreference_noDualModeWith5G_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -145,7 +145,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void changePreference_dualModeWith5G_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); when(mWifiManager.isDualModeSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -172,7 +172,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void updateDisplay_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); // Set controller band index to 1 and verify is set. mController.displayPreference(mScreen); Loading @@ -180,7 +180,7 @@ public class WifiTetherApBandPreferenceControllerTest { assertThat(mController.getBandIndex()).isEqualTo(1); // Disable 5Ghz band when(mWifiManager.isDualBandSupported()).thenReturn(false); when(mWifiManager.is5GHzBandSupported()).thenReturn(false); // Call updateDisplay and verify it's changed. mController.updateDisplay(); Loading Loading
src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ public class WifiTetherApBandPreferenceController extends WifiTetherBasePreferen private boolean is5GhzBandSupported() { final String countryCode = mWifiManager.getCountryCode(); if (!mWifiManager.isDualBandSupported() || countryCode == null) { if (!mWifiManager.is5GHzBandSupported() || countryCode == null) { return false; } return true; Loading
tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java +7 −7 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void display_5GhzSupported_shouldDisplayFullList() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); when(mWifiManager.isDualModeSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -94,7 +94,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void display_noCountryCode_shouldDisable() { when(mWifiManager.getCountryCode()).thenReturn(null); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -106,7 +106,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void display_5GhzNotSupported_shouldDisable() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(false); when(mWifiManager.is5GHzBandSupported()).thenReturn(false); mController.displayPreference(mScreen); Loading @@ -118,7 +118,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void changePreference_noDualModeWith5G_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -145,7 +145,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void changePreference_dualModeWith5G_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); when(mWifiManager.isDualModeSupported()).thenReturn(true); mController.displayPreference(mScreen); Loading @@ -172,7 +172,7 @@ public class WifiTetherApBandPreferenceControllerTest { @Test public void updateDisplay_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.isDualBandSupported()).thenReturn(true); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); // Set controller band index to 1 and verify is set. mController.displayPreference(mScreen); Loading @@ -180,7 +180,7 @@ public class WifiTetherApBandPreferenceControllerTest { assertThat(mController.getBandIndex()).isEqualTo(1); // Disable 5Ghz band when(mWifiManager.isDualBandSupported()).thenReturn(false); when(mWifiManager.is5GHzBandSupported()).thenReturn(false); // Call updateDisplay and verify it's changed. mController.updateDisplay(); Loading