Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30774,6 +30774,7 @@ package android.net.wifi { method public boolean isTdlsSupported(); method public boolean isWapiSupported(); method public boolean isWifiEnabled(); method public boolean isWifiStandardSupported(int); method public boolean isWpa3SaeSupported(); method public boolean isWpa3SuiteBSupported(); method @Deprecated public boolean pingSupplicant(); wifi/java/android/net/wifi/IWifiManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,8 @@ interface IWifiManager boolean is6GHzBandSupported(); boolean isWifiStandardSupported(int standard); boolean needs5GHzToAnyApBandConversion(); DhcpInfo getDhcpInfo(); Loading wifi/java/android/net/wifi/WifiManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -2490,6 +2490,20 @@ public class WifiManager { } } /** * Check if the chipset supports a certain Wi-Fi standard. * @param standard the IEEE 802.11 standard to check on. * valid values from {@link ScanResult}'s {@code WIFI_STANDARD_} * @return {@code true} if supported, {@code false} otherwise. */ public boolean isWifiStandardSupported(@ScanResult.WifiStandard int standard) { try { return mService.isWifiStandardSupported(standard); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Interface for Wi-Fi activity energy info listener. Should be implemented by applications and * set when calling {@link WifiManager#getWifiActivityEnergyInfoAsync}. Loading wifi/java/com/android/server/wifi/BaseWifiService.java +5 −0 Original line number Diff line number Diff line Loading @@ -253,6 +253,11 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override public boolean isWifiStandardSupported(int standard) { throw new UnsupportedOperationException(); } @Override public boolean needs5GHzToAnyApBandConversion() { throw new UnsupportedOperationException(); Loading wifi/tests/src/android/net/wifi/WifiManagerTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -1958,6 +1958,17 @@ public class WifiManagerTest { verify(mWifiService).is6GHzBandSupported(); } /** * Test behavior of {@link WifiManager#isWifiStandardSupported()} */ @Test public void testIsWifiStandardSupported() throws Exception { int standard = ScanResult.WIFI_STANDARD_11AX; when(mWifiService.isWifiStandardSupported(standard)).thenReturn(true); assertTrue(mWifiManager.isWifiStandardSupported(standard)); verify(mWifiService).isWifiStandardSupported(standard); } /** * Test behavior of {@link WifiManager#getDhcpInfo()} */ Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30774,6 +30774,7 @@ package android.net.wifi { method public boolean isTdlsSupported(); method public boolean isWapiSupported(); method public boolean isWifiEnabled(); method public boolean isWifiStandardSupported(int); method public boolean isWpa3SaeSupported(); method public boolean isWpa3SuiteBSupported(); method @Deprecated public boolean pingSupplicant();
wifi/java/android/net/wifi/IWifiManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,8 @@ interface IWifiManager boolean is6GHzBandSupported(); boolean isWifiStandardSupported(int standard); boolean needs5GHzToAnyApBandConversion(); DhcpInfo getDhcpInfo(); Loading
wifi/java/android/net/wifi/WifiManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -2490,6 +2490,20 @@ public class WifiManager { } } /** * Check if the chipset supports a certain Wi-Fi standard. * @param standard the IEEE 802.11 standard to check on. * valid values from {@link ScanResult}'s {@code WIFI_STANDARD_} * @return {@code true} if supported, {@code false} otherwise. */ public boolean isWifiStandardSupported(@ScanResult.WifiStandard int standard) { try { return mService.isWifiStandardSupported(standard); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Interface for Wi-Fi activity energy info listener. Should be implemented by applications and * set when calling {@link WifiManager#getWifiActivityEnergyInfoAsync}. Loading
wifi/java/com/android/server/wifi/BaseWifiService.java +5 −0 Original line number Diff line number Diff line Loading @@ -253,6 +253,11 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override public boolean isWifiStandardSupported(int standard) { throw new UnsupportedOperationException(); } @Override public boolean needs5GHzToAnyApBandConversion() { throw new UnsupportedOperationException(); Loading
wifi/tests/src/android/net/wifi/WifiManagerTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -1958,6 +1958,17 @@ public class WifiManagerTest { verify(mWifiService).is6GHzBandSupported(); } /** * Test behavior of {@link WifiManager#isWifiStandardSupported()} */ @Test public void testIsWifiStandardSupported() throws Exception { int standard = ScanResult.WIFI_STANDARD_11AX; when(mWifiService.isWifiStandardSupported(standard)).thenReturn(true); assertTrue(mWifiManager.isWifiStandardSupported(standard)); verify(mWifiService).isWifiStandardSupported(standard); } /** * Test behavior of {@link WifiManager#getDhcpInfo()} */ Loading