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

Commit 3ce8ab96 authored by Nate Jiang's avatar Nate Jiang Committed by Android (Google) Code Review
Browse files

Merge changes from topics "mergedNetwork", "wifiInfoSubId"

* changes:
  Add API to get Subscription Id
  [Suggestion] API to set carrier merged network
parents 886277e4 b71f909e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -31894,6 +31894,7 @@ package android.net.wifi {
    method @Nullable public String getSsid();
    method public int getSubscriptionId();
    method public boolean isAppInteractionRequired();
    method public boolean isCarrierMerged();
    method public boolean isCredentialSharedWithUser();
    method public boolean isEnhancedOpen();
    method public boolean isHiddenSsid();
@@ -31909,6 +31910,7 @@ package android.net.wifi {
    ctor public WifiNetworkSuggestion.Builder();
    method @NonNull public android.net.wifi.WifiNetworkSuggestion build();
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setBssid(@NonNull android.net.MacAddress);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierMerged(boolean);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setCredentialSharedWithUser(boolean);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsAppInteractionRequired(boolean);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsEnhancedMacRandomizationEnabled(boolean);
+2 −0
Original line number Diff line number Diff line
@@ -505,6 +505,7 @@ package android.net.wifi {
    method @Nullable public String getSsid();
    method public int getSubscriptionId();
    method public boolean isAppInteractionRequired();
    method public boolean isCarrierMerged();
    method public boolean isCredentialSharedWithUser();
    method public boolean isEnhancedOpen();
    method public boolean isHiddenSsid();
@@ -520,6 +521,7 @@ package android.net.wifi {
    ctor public WifiNetworkSuggestion.Builder();
    method @NonNull public android.net.wifi.WifiNetworkSuggestion build();
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setBssid(@NonNull android.net.MacAddress);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierMerged(boolean);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setCredentialSharedWithUser(boolean);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsAppInteractionRequired(boolean);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsEnhancedMacRandomizationEnabled(boolean);
+3 −0
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ package android.net.wifi {
    field @Deprecated public static final int RECENT_FAILURE_REFUSED_TEMPORARILY = 1002; // 0x3ea
    field @Deprecated public boolean allowAutojoin;
    field @Deprecated public int carrierId;
    field @Deprecated public boolean carrierMerged;
    field @Deprecated public String creatorName;
    field @Deprecated public int creatorUid;
    field @Deprecated public boolean fromWifiNetworkSpecifier;
@@ -426,8 +427,10 @@ package android.net.wifi {
    method @Nullable public String getRequestingPackageName();
    method public double getRetriedTxPacketsPerSecond();
    method public int getScore();
    method public int getSubscriptionId();
    method public double getSuccessfulRxPacketsPerSecond();
    method public double getSuccessfulTxPacketsPerSecond();
    method public boolean isCarrierMerged();
    method public boolean isEphemeral();
    method public boolean isOemPaid();
    method public boolean isOemPrivate();
+2 −0
Original line number Diff line number Diff line
@@ -7,5 +7,7 @@ MissingNullability: android.net.wifi.rtt.RangingRequest.Builder#addResponder(and



MutableBareField: android.net.wifi.WifiConfiguration#carrierMerged:

MutableBareField: android.net.wifi.WifiConfiguration#subscriptionId:
    Bare field subscriptionId must be marked final, or moved behind accessors if mutable
+15 −1
Original line number Diff line number Diff line
@@ -1052,6 +1052,15 @@ public class WifiConfiguration implements Parcelable {
     */
    public boolean oemPrivate;

    /**
     * Indicate whether or not the network is a carrier merged network.
     * This bit can only be used by suggestion network, see
     * {@link WifiNetworkSuggestion.Builder#setCarrierMerged(boolean)}
     * @hide
     */
    @SystemApi
    public boolean carrierMerged;

    /**
     * True if this Wifi configuration is created from a {@link WifiNetworkSuggestion},
     * false otherwise.
@@ -2283,6 +2292,7 @@ public class WifiConfiguration implements Parcelable {
        trusted = true; // Networks are considered trusted by default.
        oemPaid = false;
        oemPrivate = false;
        carrierMerged = false;
        fromWifiNetworkSuggestion = false;
        fromWifiNetworkSpecifier = false;
        meteredHint = false;
@@ -2407,12 +2417,13 @@ public class WifiConfiguration implements Parcelable {
        if (this.trusted) sbuf.append(" trusted");
        if (this.oemPaid) sbuf.append(" oemPaid");
        if (this.oemPrivate) sbuf.append(" oemPrivate");
        if (this.carrierMerged) sbuf.append(" carrierMerged");
        if (this.fromWifiNetworkSuggestion) sbuf.append(" fromWifiNetworkSuggestion");
        if (this.fromWifiNetworkSpecifier) sbuf.append(" fromWifiNetworkSpecifier");
        if (this.meteredHint) sbuf.append(" meteredHint");
        if (this.useExternalScores) sbuf.append(" useExternalScores");
        if (this.validatedInternetAccess || this.ephemeral || this.trusted || this.oemPaid
                || this.oemPrivate || this.fromWifiNetworkSuggestion
                || this.oemPrivate || this.carrierMerged || this.fromWifiNetworkSuggestion
                || this.fromWifiNetworkSpecifier || this.meteredHint || this.useExternalScores) {
            sbuf.append("\n");
        }
@@ -2980,6 +2991,7 @@ public class WifiConfiguration implements Parcelable {
            trusted = source.trusted;
            oemPaid = source.oemPaid;
            oemPrivate = source.oemPrivate;
            carrierMerged = source.carrierMerged;
            fromWifiNetworkSuggestion = source.fromWifiNetworkSuggestion;
            fromWifiNetworkSpecifier = source.fromWifiNetworkSpecifier;
            meteredHint = source.meteredHint;
@@ -3062,6 +3074,7 @@ public class WifiConfiguration implements Parcelable {
        dest.writeInt(trusted ? 1 : 0);
        dest.writeInt(oemPaid ? 1 : 0);
        dest.writeInt(oemPrivate ? 1 : 0);
        dest.writeInt(carrierMerged ? 1 : 0);
        dest.writeInt(fromWifiNetworkSuggestion ? 1 : 0);
        dest.writeInt(fromWifiNetworkSpecifier ? 1 : 0);
        dest.writeInt(meteredHint ? 1 : 0);
@@ -3141,6 +3154,7 @@ public class WifiConfiguration implements Parcelable {
                config.trusted = in.readInt() != 0;
                config.oemPaid = in.readInt() != 0;
                config.oemPrivate = in.readInt() != 0;
                config.carrierMerged = in.readInt() != 0;
                config.fromWifiNetworkSuggestion =  in.readInt() != 0;
                config.fromWifiNetworkSpecifier =  in.readInt() != 0;
                config.meteredHint = in.readInt() != 0;
Loading