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

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

Merge "WifiNetworkConfigBuilder: Split into 2 separate builders"

parents c0e07d73 3409263c
Loading
Loading
Loading
Loading
+37 −18
Original line number Diff line number Diff line
@@ -28949,6 +28949,7 @@ package android.net {
  }
  public abstract class NetworkSpecifier {
    ctor public NetworkSpecifier();
  }
  public class ParseException extends java.lang.RuntimeException {
@@ -29972,24 +29973,25 @@ package android.net.wifi {
    method @Deprecated public abstract void onSucceeded();
  }
  public class WifiNetworkConfigBuilder {
    ctor public WifiNetworkConfigBuilder();
    method public android.net.NetworkSpecifier buildNetworkSpecifier();
    method public android.net.wifi.WifiNetworkSuggestion buildNetworkSuggestion();
    method public android.net.wifi.WifiNetworkConfigBuilder setBssid(@NonNull android.net.MacAddress);
    method public android.net.wifi.WifiNetworkConfigBuilder setBssidPattern(@NonNull android.net.MacAddress, @NonNull android.net.MacAddress);
    method public android.net.wifi.WifiNetworkConfigBuilder setIsAppInteractionRequired();
    method public android.net.wifi.WifiNetworkConfigBuilder setIsEnhancedOpen();
    method public android.net.wifi.WifiNetworkConfigBuilder setIsHiddenSsid();
    method public android.net.wifi.WifiNetworkConfigBuilder setIsMetered();
    method public android.net.wifi.WifiNetworkConfigBuilder setIsUserInteractionRequired();
    method public android.net.wifi.WifiNetworkConfigBuilder setPriority(int);
    method public android.net.wifi.WifiNetworkConfigBuilder setSsid(@NonNull String);
    method public android.net.wifi.WifiNetworkConfigBuilder setSsidPattern(@NonNull android.os.PatternMatcher);
    method public android.net.wifi.WifiNetworkConfigBuilder setWpa2EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
    method public android.net.wifi.WifiNetworkConfigBuilder setWpa2Passphrase(@NonNull String);
    method public android.net.wifi.WifiNetworkConfigBuilder setWpa3EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
    method public android.net.wifi.WifiNetworkConfigBuilder setWpa3Passphrase(@NonNull String);
  public final class WifiNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.wifi.WifiNetworkSpecifier> CREATOR;
  }
  public static class WifiNetworkSpecifier.Builder {
    ctor public WifiNetworkSpecifier.Builder();
    method public android.net.NetworkSpecifier build();
    method public android.net.wifi.WifiNetworkSpecifier.Builder setBssid(@NonNull android.net.MacAddress);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setBssidPattern(@NonNull android.net.MacAddress, @NonNull android.net.MacAddress);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setIsEnhancedOpen();
    method public android.net.wifi.WifiNetworkSpecifier.Builder setIsHiddenSsid();
    method public android.net.wifi.WifiNetworkSpecifier.Builder setSsid(@NonNull String);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setSsidPattern(@NonNull android.os.PatternMatcher);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setWpa2EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setWpa2Passphrase(@NonNull String);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setWpa3EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
    method public android.net.wifi.WifiNetworkSpecifier.Builder setWpa3Passphrase(@NonNull String);
  }
  public final class WifiNetworkSuggestion implements android.os.Parcelable {
@@ -29998,6 +30000,23 @@ package android.net.wifi {
    field public static final android.os.Parcelable.Creator<android.net.wifi.WifiNetworkSuggestion> CREATOR;
  }
  public static class WifiNetworkSuggestion.Builder {
    ctor public WifiNetworkSuggestion.Builder();
    method public android.net.wifi.WifiNetworkSuggestion build();
    method public android.net.wifi.WifiNetworkSuggestion.Builder setBssid(@NonNull android.net.MacAddress);
    method public android.net.wifi.WifiNetworkSuggestion.Builder setIsAppInteractionRequired();
    method public android.net.wifi.WifiNetworkSuggestion.Builder setIsEnhancedOpen();
    method public android.net.wifi.WifiNetworkSuggestion.Builder setIsHiddenSsid();
    method public android.net.wifi.WifiNetworkSuggestion.Builder setIsMetered();
    method public android.net.wifi.WifiNetworkSuggestion.Builder setIsUserInteractionRequired();
    method public android.net.wifi.WifiNetworkSuggestion.Builder setPriority(int);
    method public android.net.wifi.WifiNetworkSuggestion.Builder setSsid(@NonNull String);
    method public android.net.wifi.WifiNetworkSuggestion.Builder setWpa2EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
    method public android.net.wifi.WifiNetworkSuggestion.Builder setWpa2Passphrase(@NonNull String);
    method public android.net.wifi.WifiNetworkSuggestion.Builder setWpa3EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
    method public android.net.wifi.WifiNetworkSuggestion.Builder setWpa3Passphrase(@NonNull String);
  }
  public class WpsInfo implements android.os.Parcelable {
    ctor public WpsInfo();
    ctor public WpsInfo(android.net.wifi.WpsInfo);
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ package android.net;
 * subclasses of this class via other APIs.
 */
public abstract class NetworkSpecifier {
    /** @hide */
    public NetworkSpecifier() {}

    /**
+3 −2
Original line number Diff line number Diff line
@@ -49,8 +49,9 @@ import java.util.HashMap;
 * A class representing a configured Wi-Fi network, including the
 * security configuration.
 *
 * @deprecated Use {@link WifiNetworkConfigBuilder} to create {@link NetworkSpecifier} and
 * {@link WifiNetworkSuggestion}. This will become a system use only object in the future.
 * @deprecated Use {@link WifiNetworkSpecifier.Builder} to create {@link NetworkSpecifier} and
 * {@link WifiNetworkSuggestion.Builder} to create {@link WifiNetworkSuggestion}. This will become a
 * system use only object in the future.
 */
@Deprecated
public class WifiConfiguration implements Parcelable {
+13 −13
Original line number Diff line number Diff line
@@ -947,8 +947,8 @@ public class WifiManager {
    /**
     * Directed broadcast intent action indicating that the device has connected to one of the
     * network suggestions provided by the app. This will be sent post connection to a network
     * which was created with {@link WifiNetworkConfigBuilder#setIsAppInteractionRequired()} flag
     * set.
     * which was created with {@link WifiNetworkSuggestion.Builder#setIsAppInteractionRequired()}
     * flag set.
     * <p>
     * Note: The broadcast is sent to the app only if it holds
     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} permission.
@@ -1171,7 +1171,7 @@ public class WifiManager {
     * of {@link WifiConfiguration} objects.
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1323,7 +1323,7 @@ public class WifiManager {
     *         Returns {@code -1} on failure.
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1358,7 +1358,7 @@ public class WifiManager {
     *         existing network.
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1647,8 +1647,8 @@ public class WifiManager {
     * for a detailed explanation of the parameters.
     * When the device decides to connect to one of the provided network suggestions, platform sends
     * a directed broadcast {@link #ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION} to the app if
     * the network was created with {@link WifiNetworkConfigBuilder#setIsAppInteractionRequired()}
     * flag set and the app holds
     * the network was created with {@link WifiNetworkSuggestion.Builder
     * #setIsAppInteractionRequired()} flag set and the app holds
     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} permission.
     *<p>
     * NOTE:
@@ -1835,7 +1835,7 @@ public class WifiManager {
     * @return {@code true} if the operation succeeded
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1879,7 +1879,7 @@ public class WifiManager {
     * @return {@code true} if the operation succeeded
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1911,7 +1911,7 @@ public class WifiManager {
     * @return {@code true} if the operation succeeded
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1934,7 +1934,7 @@ public class WifiManager {
     * @return {@code true} if the operation succeeded
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1958,7 +1958,7 @@ public class WifiManager {
     * @return {@code true} if the operation succeeded
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
@@ -1982,7 +1982,7 @@ public class WifiManager {
     * @return {@code true} if the operation succeeded
     *
     * @deprecated
     * a) See {@link WifiNetworkConfigBuilder#buildNetworkSpecifier()} for new
     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
     * mechanism to trigger connection to a Wi-Fi network.
     * b) See {@link #addNetworkSuggestions(List)},
     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ public final class WifiNetworkAgentSpecifier extends NetworkSpecifier implements
     */
    public boolean satisfiesNetworkSpecifier(@NonNull WifiNetworkSpecifier ns) {
        // None of these should be null by construction.
        // {@link WifiNetworkConfigBuilder} enforces non-null in {@link WifiNetworkSpecifier}.
        // {@link WifiNetworkSpecifier.Builder} enforces non-null in {@link WifiNetworkSpecifier}.
        // {@link WifiNetworkFactory} ensures non-null in {@link WifiNetworkAgentSpecifier}.
        checkNotNull(ns);
        checkNotNull(ns.ssidPatternMatcher);
Loading