Merge "Remove WifiManager.isDualModeSupported()"
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -123,8 +123,6 @@ interface IWifiManager
|
||||
|
||||
boolean isWifiStandardSupported(int standard);
|
||||
|
||||
boolean needs5GHzToAnyApBandConversion();
|
||||
|
||||
DhcpInfo getDhcpInfo();
|
||||
|
||||
boolean isScanAlwaysAvailable();
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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()}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user