Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4737,6 +4737,7 @@ package android.net.wifi { method @Deprecated public boolean hasNoInternetAccess(); method @Deprecated public boolean isEphemeral(); method @Deprecated public boolean isNoInternetAccessExpected(); field @Deprecated public boolean allowAutojoin; field @Deprecated public String creatorName; field @Deprecated public int creatorUid; field @Deprecated public String lastUpdateName; Loading @@ -4759,6 +4760,7 @@ package android.net.wifi { public class WifiManager { method @RequiresPermission("android.permission.WIFI_UPDATE_USABILITY_STATS_SCORE") public void addOnWifiUsabilityStatsListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener); method @RequiresPermission("android.permission.NETWORK_SETTINGS") public void allowAutojoin(int, boolean); method @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void connect(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener); method @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void connect(int, @Nullable android.net.wifi.WifiManager.ActionListener); method @Deprecated @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void disable(int, @Nullable android.net.wifi.WifiManager.ActionListener); Loading wifi/java/android/net/wifi/IWifiManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ interface IWifiManager boolean disableNetwork(int netId, String packageName); void allowAutojoin(int netId, boolean choice); boolean startScan(String packageName); List<ScanResult> getScanResults(String callingPackage); Loading wifi/java/android/net/wifi/WifiConfiguration.java +12 −0 Original line number Diff line number Diff line Loading @@ -735,6 +735,14 @@ public class WifiConfiguration implements Parcelable { */ public int userApproved = USER_UNSPECIFIED; /** * @hide * Auto-join is allowed by user for this network. * Default true. */ @SystemApi public boolean allowAutojoin = true; /** The Below RSSI thresholds are used to configure AutoJoin * - GOOD/LOW/BAD thresholds are used so as to calculate link score * - UNWANTED_SOFT are used by the blacklisting logic so as to handle Loading Loading @@ -2022,6 +2030,7 @@ public class WifiConfiguration implements Parcelable { if (updateIdentifier != null) sbuf.append(" updateIdentifier=" + updateIdentifier); sbuf.append(" lcuid=" + lastConnectUid); sbuf.append(" userApproved=" + userApprovedAsString(userApproved)); sbuf.append(" allowAutojoin=" + allowAutojoin); sbuf.append(" noInternetAccessExpected=" + noInternetAccessExpected); sbuf.append(" "); Loading Loading @@ -2421,6 +2430,7 @@ public class WifiConfiguration implements Parcelable { numScorerOverrideAndSwitchedNetwork = source.numScorerOverrideAndSwitchedNetwork; numAssociation = source.numAssociation; userApproved = source.userApproved; allowAutojoin = source.allowAutojoin; numNoInternetAccessReports = source.numNoInternetAccessReports; noInternetAccessExpected = source.noInternetAccessExpected; creationTime = source.creationTime; Loading Loading @@ -2496,6 +2506,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(numScorerOverrideAndSwitchedNetwork); dest.writeInt(numAssociation); dest.writeInt(userApproved); dest.writeBoolean(allowAutojoin); dest.writeInt(numNoInternetAccessReports); dest.writeInt(noInternetAccessExpected ? 1 : 0); dest.writeInt(shared ? 1 : 0); Loading Loading @@ -2571,6 +2582,7 @@ public class WifiConfiguration implements Parcelable { config.numScorerOverrideAndSwitchedNetwork = in.readInt(); config.numAssociation = in.readInt(); config.userApproved = in.readInt(); config.allowAutojoin = in.readBoolean(); config.numNoInternetAccessReports = in.readInt(); config.noInternetAccessExpected = in.readInt() != 0; config.shared = in.readInt() != 0; Loading wifi/java/android/net/wifi/WifiManager.java +23 −0 Original line number Diff line number Diff line Loading @@ -3868,6 +3868,29 @@ public class WifiManager { } } /** * 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 * CONFIGURED_NETWORKS_CHANGED broadcast. * * @param netId the id of the network to allow/disallow autojoin for. * @param choice true to allow autojoin, false to disallow autojoin * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoin(int netId, boolean choice) { try { IWifiManager iWifiManager = getIWifiManager(); if (iWifiManager == null) { throw new RemoteException("Wifi service is not running"); } iWifiManager.allowAutojoin(netId, choice); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Disable ephemeral Network * Loading wifi/java/com/android/server/wifi/BaseWifiService.java +5 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,11 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override public void allowAutojoin(int netId, boolean choice) { throw new UnsupportedOperationException(); } @Override public boolean startScan(String packageName) { throw new UnsupportedOperationException(); Loading Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4737,6 +4737,7 @@ package android.net.wifi { method @Deprecated public boolean hasNoInternetAccess(); method @Deprecated public boolean isEphemeral(); method @Deprecated public boolean isNoInternetAccessExpected(); field @Deprecated public boolean allowAutojoin; field @Deprecated public String creatorName; field @Deprecated public int creatorUid; field @Deprecated public String lastUpdateName; Loading @@ -4759,6 +4760,7 @@ package android.net.wifi { public class WifiManager { method @RequiresPermission("android.permission.WIFI_UPDATE_USABILITY_STATS_SCORE") public void addOnWifiUsabilityStatsListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener); method @RequiresPermission("android.permission.NETWORK_SETTINGS") public void allowAutojoin(int, boolean); method @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void connect(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener); method @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void connect(int, @Nullable android.net.wifi.WifiManager.ActionListener); method @Deprecated @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void disable(int, @Nullable android.net.wifi.WifiManager.ActionListener); Loading
wifi/java/android/net/wifi/IWifiManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ interface IWifiManager boolean disableNetwork(int netId, String packageName); void allowAutojoin(int netId, boolean choice); boolean startScan(String packageName); List<ScanResult> getScanResults(String callingPackage); Loading
wifi/java/android/net/wifi/WifiConfiguration.java +12 −0 Original line number Diff line number Diff line Loading @@ -735,6 +735,14 @@ public class WifiConfiguration implements Parcelable { */ public int userApproved = USER_UNSPECIFIED; /** * @hide * Auto-join is allowed by user for this network. * Default true. */ @SystemApi public boolean allowAutojoin = true; /** The Below RSSI thresholds are used to configure AutoJoin * - GOOD/LOW/BAD thresholds are used so as to calculate link score * - UNWANTED_SOFT are used by the blacklisting logic so as to handle Loading Loading @@ -2022,6 +2030,7 @@ public class WifiConfiguration implements Parcelable { if (updateIdentifier != null) sbuf.append(" updateIdentifier=" + updateIdentifier); sbuf.append(" lcuid=" + lastConnectUid); sbuf.append(" userApproved=" + userApprovedAsString(userApproved)); sbuf.append(" allowAutojoin=" + allowAutojoin); sbuf.append(" noInternetAccessExpected=" + noInternetAccessExpected); sbuf.append(" "); Loading Loading @@ -2421,6 +2430,7 @@ public class WifiConfiguration implements Parcelable { numScorerOverrideAndSwitchedNetwork = source.numScorerOverrideAndSwitchedNetwork; numAssociation = source.numAssociation; userApproved = source.userApproved; allowAutojoin = source.allowAutojoin; numNoInternetAccessReports = source.numNoInternetAccessReports; noInternetAccessExpected = source.noInternetAccessExpected; creationTime = source.creationTime; Loading Loading @@ -2496,6 +2506,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(numScorerOverrideAndSwitchedNetwork); dest.writeInt(numAssociation); dest.writeInt(userApproved); dest.writeBoolean(allowAutojoin); dest.writeInt(numNoInternetAccessReports); dest.writeInt(noInternetAccessExpected ? 1 : 0); dest.writeInt(shared ? 1 : 0); Loading Loading @@ -2571,6 +2582,7 @@ public class WifiConfiguration implements Parcelable { config.numScorerOverrideAndSwitchedNetwork = in.readInt(); config.numAssociation = in.readInt(); config.userApproved = in.readInt(); config.allowAutojoin = in.readBoolean(); config.numNoInternetAccessReports = in.readInt(); config.noInternetAccessExpected = in.readInt() != 0; config.shared = in.readInt() != 0; Loading
wifi/java/android/net/wifi/WifiManager.java +23 −0 Original line number Diff line number Diff line Loading @@ -3868,6 +3868,29 @@ public class WifiManager { } } /** * 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 * CONFIGURED_NETWORKS_CHANGED broadcast. * * @param netId the id of the network to allow/disallow autojoin for. * @param choice true to allow autojoin, false to disallow autojoin * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoin(int netId, boolean choice) { try { IWifiManager iWifiManager = getIWifiManager(); if (iWifiManager == null) { throw new RemoteException("Wifi service is not running"); } iWifiManager.allowAutojoin(netId, choice); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Disable ephemeral Network * Loading
wifi/java/com/android/server/wifi/BaseWifiService.java +5 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,11 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override public void allowAutojoin(int netId, boolean choice) { throw new UnsupportedOperationException(); } @Override public boolean startScan(String packageName) { throw new UnsupportedOperationException(); Loading