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

Commit 25d969e2 authored by Jimmy Chen's avatar Jimmy Chen
Browse files

wifi: Add WifiMananger API is60GHzBandSupported

New system API mostly for usage from Settings,
to update the UI with features such as 60GHz band
selection in case the device is configured with 60GHz
support.

Bug: 147469373
Test: Manual - enable wifi and connect to an access point
Test: atest FrameworksWifiTests
Test: atest FrameworksWifiApiTests
Change-Id: Idb6b5350aaf1566df6a39fc0e3432f8464bf6df1
parent 8cb836d0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7344,6 +7344,7 @@ package android.net.wifi {
    method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.WifiConfiguration getWifiApConfiguration();
    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public int getWifiApState();
    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.net.wifi.WifiConfiguration> getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(@NonNull java.util.List<android.net.wifi.ScanResult>);
    method public boolean is60GHzBandSupported();
    method public boolean isApMacRandomizationSupported();
    method public boolean isConnectedMacRandomizationSupported();
    method @Deprecated public boolean isDeviceToDeviceRttSupported();
+1 −0
Original line number Diff line number Diff line
@@ -449,6 +449,7 @@ package android.net.wifi {
    method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.WifiConfiguration getWifiApConfiguration();
    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public int getWifiApState();
    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.net.wifi.WifiConfiguration> getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(@NonNull java.util.List<android.net.wifi.ScanResult>);
    method public boolean is60GHzBandSupported();
    method public boolean isApMacRandomizationSupported();
    method public boolean isConnectedMacRandomizationSupported();
    method @Deprecated public boolean isDeviceToDeviceRttSupported();
+2 −0
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@ interface IWifiManager

    boolean is6GHzBandSupported();

    boolean is60GHzBandSupported();

    boolean isWifiStandardSupported(int standard);

    DhcpInfo getDhcpInfo();
+17 −0
Original line number Diff line number Diff line
@@ -2407,6 +2407,8 @@ public class WifiManager {
    public static final long WIFI_FEATURE_OCE              = 0x1000000000L; // OCE Support
    /** @hide */
    public static final long WIFI_FEATURE_WAPI             = 0x2000000000L; // WAPI
    /** @hide */
    public static final long WIFI_FEATURE_INFRA_60G        = 0x4000000000L; // 60 GHz Band Support

    /** @hide */
    public static final long WIFI_FEATURE_FILS_SHA256     = 0x4000000000L; // FILS-SHA256
@@ -2568,6 +2570,21 @@ public class WifiManager {
        }
    }

    /**
     * Check if the chipset supports the 60GHz frequency band.
     *
     * @return {@code true} if supported, {@code false} otherwise.
     * @hide
     */
    @SystemApi
    public boolean is60GHzBandSupported() {
        try {
            return mService.is60GHzBandSupported();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Check if the chipset supports 6GHz band.
     * @return {@code true} if supported, {@code false} otherwise.