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

Commit d6fb4a21 authored by Ahmed ElArabawy's avatar Ahmed ElArabawy Committed by Android (Google) Code Review
Browse files

Merge "Wifi: Support check on device capability for 6GHZ"

parents 7c93dc5e c67d4f75
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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();
+11 −0
Original line number Diff line number Diff line
@@ -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 {
@@ -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
     */
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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());