Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30059,6 +30059,7 @@ package android.net.wifi { method public java.util.List<android.net.wifi.ScanResult> getScanResults(); method public int getWifiState(); method public boolean is5GHzBandSupported(); method public boolean is6GHzBandSupported(); method @Deprecated public boolean isDeviceToApRttSupported(); method public boolean isEasyConnectSupported(); method public boolean isEnhancedOpenSupported(); wifi/java/android/net/wifi/WifiManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -2257,6 +2257,8 @@ public class WifiManager { public static final long WIFI_FEATURE_MBO = 0x800000000L; // MBO Support /** @hide */ public static final long WIFI_FEATURE_OCE = 0x1000000000L; // OCE Support /** @hide */ public static final long WIFI_FEATURE_INFRA_6G = 0x2000000000L; // Support 6 GHz band private long getSupportedFeatures() { try { Loading @@ -2271,6 +2273,7 @@ public class WifiManager { private boolean isFeatureSupported(long feature) { return (getSupportedFeatures() & feature) == feature; } /** * @return true if this adapter supports 5 GHz band */ Loading @@ -2278,6 +2281,14 @@ public class WifiManager { return isFeatureSupported(WIFI_FEATURE_INFRA_5G); } /** * @return true if the device supports operating in the 6 GHz band and Wi-Fi is enabled, * false otherwise. */ public boolean is6GHzBandSupported() { return isFeatureSupported(WIFI_FEATURE_INFRA_6G); } /** * @return true if this adapter supports Passpoint * @hide Loading wifi/tests/src/android/net/wifi/WifiManagerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -1586,6 +1586,7 @@ public class WifiManagerTest { assertTrue(mWifiManager.isP2pSupported()); assertFalse(mWifiManager.isPortableHotspotSupported()); assertFalse(mWifiManager.is5GHzBandSupported()); assertFalse(mWifiManager.is6GHzBandSupported()); assertFalse(mWifiManager.isDeviceToDeviceRttSupported()); assertFalse(mWifiManager.isDeviceToApRttSupported()); assertFalse(mWifiManager.isPreferredNetworkOffloadSupported()); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30059,6 +30059,7 @@ package android.net.wifi { method public java.util.List<android.net.wifi.ScanResult> getScanResults(); method public int getWifiState(); method public boolean is5GHzBandSupported(); method public boolean is6GHzBandSupported(); method @Deprecated public boolean isDeviceToApRttSupported(); method public boolean isEasyConnectSupported(); method public boolean isEnhancedOpenSupported();
wifi/java/android/net/wifi/WifiManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -2257,6 +2257,8 @@ public class WifiManager { public static final long WIFI_FEATURE_MBO = 0x800000000L; // MBO Support /** @hide */ public static final long WIFI_FEATURE_OCE = 0x1000000000L; // OCE Support /** @hide */ public static final long WIFI_FEATURE_INFRA_6G = 0x2000000000L; // Support 6 GHz band private long getSupportedFeatures() { try { Loading @@ -2271,6 +2273,7 @@ public class WifiManager { private boolean isFeatureSupported(long feature) { return (getSupportedFeatures() & feature) == feature; } /** * @return true if this adapter supports 5 GHz band */ Loading @@ -2278,6 +2281,14 @@ public class WifiManager { return isFeatureSupported(WIFI_FEATURE_INFRA_5G); } /** * @return true if the device supports operating in the 6 GHz band and Wi-Fi is enabled, * false otherwise. */ public boolean is6GHzBandSupported() { return isFeatureSupported(WIFI_FEATURE_INFRA_6G); } /** * @return true if this adapter supports Passpoint * @hide Loading
wifi/tests/src/android/net/wifi/WifiManagerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -1586,6 +1586,7 @@ public class WifiManagerTest { assertTrue(mWifiManager.isP2pSupported()); assertFalse(mWifiManager.isPortableHotspotSupported()); assertFalse(mWifiManager.is5GHzBandSupported()); assertFalse(mWifiManager.is6GHzBandSupported()); assertFalse(mWifiManager.isDeviceToDeviceRttSupported()); assertFalse(mWifiManager.isDeviceToApRttSupported()); assertFalse(mWifiManager.isPreferredNetworkOffloadSupported()); Loading