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

Commit 79ac8037 authored by Roshan Pius's avatar Roshan Pius Committed by Android (Google) Code Review
Browse files

Merge "WifiManager: Expose enableWifiConnectivityManager"

parents 76d97548 ac676efc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7504,6 +7504,7 @@ package android.net.wifi {
  public class WifiManager {
    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void addOnWifiUsabilityStatsListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener);
    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoin(int, boolean);
    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinGlobal(boolean);
    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinPasspoint(@NonNull String, boolean);
    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void clearWifiConnectedNetworkScorer();
    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener);
+2 −2
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ interface IWifiManager

    boolean disableNetwork(int netId, String packageName);

    void allowAutojoinGlobal(boolean choice);

    void allowAutojoin(int netId, boolean choice);

    void allowAutojoinPasspoint(String fqdn, boolean enableAutoJoin);
@@ -179,8 +181,6 @@ interface IWifiManager

    int getVerboseLoggingLevel();

    void enableWifiConnectivityManager(boolean enabled);

    void disableEphemeralNetwork(String SSID, String packageName);

    void factoryReset(String packageName);
+17 −12
Original line number Diff line number Diff line
@@ -4298,6 +4298,23 @@ public class WifiManager {
        }
    }

    /**
     * Allows the OEM to enable/disable auto-join globally.
     *
     * @param choice true to allow autojoin, false to disallow autojoin
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
    public void allowAutojoinGlobal(boolean choice) {
        try {
            mService.allowAutojoinGlobal(choice);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }


    /**
     * Sets the user choice for allowing auto-join to a network.
     * The updated choice will be made available through the updated config supplied by the
@@ -4924,18 +4941,6 @@ public class WifiManager {
        return false;
    }

    /**
     * Enable/disable WifiConnectivityManager
     * @hide
     */
    public void enableWifiConnectivityManager(boolean enabled) {
        try {
            mService.enableWifiConnectivityManager(enabled);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Returns a byte stream representing the data that needs to be backed up to save the
     * current Wifi state.
+7 −1
Original line number Diff line number Diff line
@@ -177,6 +177,11 @@ public class BaseWifiService extends IWifiManager.Stub {
        throw new UnsupportedOperationException();
    }

    @Override
    public void allowAutojoinGlobal(boolean choice) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void allowAutojoin(int netId, boolean choice) {
        throw new UnsupportedOperationException();
@@ -404,7 +409,8 @@ public class BaseWifiService extends IWifiManager.Stub {
        throw new UnsupportedOperationException();
    }

    @Override
    /** @deprecated use {@link #allowAutojoinGlobal(boolean)} instead */
    @Deprecated
    public void enableWifiConnectivityManager(boolean enabled) {
        throw new UnsupportedOperationException();
    }