Remove WifiManager#get/setFrequencyBand

These methods are marked @hide and only partially implemented by
the WifiService.  In general, it seems wrong to strictly prefer
one WiFi band over another for all WiFi operations.  To reduce
implementation complexity, cause setFrequencyBand to become a noop
and getFrequencyBand to reflect the underlying reality, which is
that we will always operate on all supported bands.

Bug: 31148223
Test: Compiles
Change-Id: Iccff517915f7d5ed7e96bf56e4f195b2cda80f0a
This commit is contained in:
Christopher Wiley
2016-09-19 14:09:42 -07:00
parent dfa6e6f186
commit 79ec1736be
2 changed files with 0 additions and 38 deletions

View File

@@ -97,10 +97,6 @@ interface IWifiManager
String getCountryCode();
void setFrequencyBand(int band, boolean persist);
int getFrequencyBand();
boolean isDualBandSupported();
boolean saveConfiguration();

View File

@@ -1375,40 +1375,6 @@ public class WifiManager {
}
}
/**
* Set the operational frequency band.
* @param band One of
* {@link #WIFI_FREQUENCY_BAND_AUTO},
* {@link #WIFI_FREQUENCY_BAND_5GHZ},
* {@link #WIFI_FREQUENCY_BAND_2GHZ},
* @param persist {@code true} if this needs to be remembered
* @hide
*/
public void setFrequencyBand(int band, boolean persist) {
try {
mService.setFrequencyBand(band, persist);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
* Get the operational frequency band.
* @return One of
* {@link #WIFI_FREQUENCY_BAND_AUTO},
* {@link #WIFI_FREQUENCY_BAND_5GHZ},
* {@link #WIFI_FREQUENCY_BAND_2GHZ} or
* {@code -1} on failure.
* @hide
*/
public int getFrequencyBand() {
try {
return mService.getFrequencyBand();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
* Check if the chipset supports dual frequency band (2.4 GHz and 5 GHz)
* @return {@code true} if supported, {@code false} otherwise.