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

Commit 5d1f1d41 authored by David Su's avatar David Su
Browse files

Remove WifiManager.isDualModeSupported()

Remove isDualModeSupported, replace callers
with isStaApConcurrencySupported.

Bug: 144925765
Test: atest FrameworksWifiApiTests
Test: boots up and connects to Wifi
Change-Id: I2ed7c483599a1f919cf8a14c22659cf957b67cad
parent abaa9043
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -7622,7 +7622,6 @@ package android.net.wifi {
    method public boolean isApMacRandomizationSupported();
    method public boolean isConnectedMacRandomizationSupported();
    method @Deprecated public boolean isDeviceToDeviceRttSupported();
    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean isDualModeSupported();
    method public boolean isPortableHotspotSupported();
    method public boolean isVerboseLoggingEnabled();
    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiApEnabled();
+0 −2
Original line number Diff line number Diff line
@@ -123,8 +123,6 @@ interface IWifiManager

    boolean isWifiStandardSupported(int standard);

    boolean needs5GHzToAnyApBandConversion();

    DhcpInfo getDhcpInfo();

    boolean isScanAlwaysAvailable();
+0 −23
Original line number Diff line number Diff line
@@ -2801,29 +2801,6 @@ public class WifiManager {
        }
    }

    /**
     * Check if the device is dual mode capable i.e. supports concurrent STA + Soft AP.
     *
     * If the device is dual mode capable, it may require conversion of the user's Soft AP band
     * selection {@link SoftApConfiguration#mBand} from {@link SoftApConfiguration#BAND_5GHZ} to
     * include also {@link SoftApConfiguration#BAND_2GHZ}, since if the device is connected to a
     * 5GHz DFS channel as a STA, it may be unable to honor a request to start Soft AP on the same
     * DFS channel.
     *
     * @return {@code true} if dual mode STA + AP is supported by this device, {@code false}
     * otherwise.
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
    public boolean isDualModeSupported() {
        try {
            return mService.needs5GHzToAnyApBandConversion();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Return the DHCP-assigned addresses from the last successful DHCP request,
     * if any.
+3 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.net.wifi.ScanResult;
import android.net.wifi.SoftApConfiguration;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiNetworkSuggestion;
import android.net.wifi.hotspot2.IProvisioningCallback;
import android.net.wifi.hotspot2.OsuProvider;
@@ -268,7 +269,8 @@ public class BaseWifiService extends IWifiManager.Stub {
        throw new UnsupportedOperationException();
    }

    @Override
    /** @deprecated use {@link WifiManager#isStaApConcurrencySupported()} */
    @Deprecated
    public boolean needs5GHzToAnyApBandConversion() {
        throw new UnsupportedOperationException();
    }
+0 −10
Original line number Diff line number Diff line
@@ -1927,16 +1927,6 @@ public class WifiManagerTest {
        assertEquals(wifiInfo, mWifiManager.getConnectionInfo());
    }

    /**
     * Test behavior of {@link WifiManager#isDualModeSupported()} ()}
     */
    @Test
    public void testIsDualModeSupported() throws Exception {
        when(mWifiService.needs5GHzToAnyApBandConversion()).thenReturn(true);
        assertTrue(mWifiManager.isDualModeSupported());
        verify(mWifiService).needs5GHzToAnyApBandConversion();
    }

    /**
     * Test behavior of {@link WifiManager#is5GHzBandSupported()}
     */