Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5676b6fe authored by David Su's avatar David Su Committed by Android (Google) Code Review
Browse files

Merge "Migrate WifiManager.isDualModeSupported() to isStaApConcurrencySupported()"

parents 634044dc 8ab62a87
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public class WifiTetherApBandPreferenceController extends WifiTetherBasePreferen
    public WifiTetherApBandPreferenceController(Context context,
            OnTetherConfigUpdateListener listener) {
        super(context, listener);
        isDualMode = mWifiManager.isDualModeSupported();
        isDualMode = mWifiManager.isStaApConcurrencySupported();
        updatePreferenceEntries();
    }

+3 −3
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public class WifiTetherApBandPreferenceControllerTest {
        when(mScreen.findPreference(anyString())).thenReturn(mPreference);
        when(mWifiManager.getSoftApConfiguration()).thenReturn(
                new SoftApConfiguration.Builder().build());
        when(mWifiManager.isDualModeSupported()).thenReturn(false);
        when(mWifiManager.isStaApConcurrencySupported()).thenReturn(false);

        mController = new WifiTetherApBandPreferenceController(mContext, mListener);
    }
@@ -90,7 +90,7 @@ public class WifiTetherApBandPreferenceControllerTest {
    public void display_5GhzSupported_shouldDisplayFullList() {
        when(mWifiManager.getCountryCode()).thenReturn("US");
        when(mWifiManager.is5GHzBandSupported()).thenReturn(true);
        when(mWifiManager.isDualModeSupported()).thenReturn(true);
        when(mWifiManager.isStaApConcurrencySupported()).thenReturn(true);

        // Create a new instance to pick the proper value of isDualModeSupported()
        mController = new WifiTetherApBandPreferenceController(mContext, mListener);
@@ -156,7 +156,7 @@ public class WifiTetherApBandPreferenceControllerTest {
    public void changePreference_dualModeWith5G_shouldUpdateValue() {
        when(mWifiManager.getCountryCode()).thenReturn("US");
        when(mWifiManager.is5GHzBandSupported()).thenReturn(true);
        when(mWifiManager.isDualModeSupported()).thenReturn(true);
        when(mWifiManager.isStaApConcurrencySupported()).thenReturn(true);

        // Create a new instance to pick the proper value of isDualModeSupported()
        mController = new WifiTetherApBandPreferenceController(mContext, mListener);