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

Commit 14d9520d authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Make MatchAllNetworkSpecifier constructor @SystemApi" am: 9dd0968c am: 011eb066

Change-Id: I8d0be2c9deff0f48842f8a3bb3c4a685ffe2e095
parents cd787868 011eb066
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -4350,6 +4350,13 @@ package android.net {
    method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
    method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>);
  }
  }
  public final class MatchAllNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
    ctor public MatchAllNetworkSpecifier();
    method public int describeContents();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.net.MatchAllNetworkSpecifier> CREATOR;
  }
  public class Network implements android.os.Parcelable {
  public class Network implements android.os.Parcelable {
    ctor public Network(@NonNull android.net.Network);
    ctor public Network(@NonNull android.net.Network);
    method @NonNull public android.net.Network getPrivateDnsBypassingCopy();
    method @NonNull public android.net.Network getPrivateDnsBypassingCopy();
+7 −2
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package android.net;
package android.net;


import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;


@@ -27,10 +29,12 @@ import android.os.Parcelable;
 *
 *
 * @hide
 * @hide
 */
 */
@SystemApi
public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements Parcelable {
public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements Parcelable {
    /**
    /**
     * Utility method which verifies that the ns argument is not a MatchAllNetworkSpecifier and
     * Utility method which verifies that the ns argument is not a MatchAllNetworkSpecifier and
     * throws an IllegalArgumentException if it is.
     * throws an IllegalArgumentException if it is.
     * @hide
     */
     */
    public static void checkNotMatchAllNetworkSpecifier(NetworkSpecifier ns) {
    public static void checkNotMatchAllNetworkSpecifier(NetworkSpecifier ns) {
        if (ns instanceof MatchAllNetworkSpecifier) {
        if (ns instanceof MatchAllNetworkSpecifier) {
@@ -38,6 +42,7 @@ public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements
        }
        }
    }
    }


    /** @hide */
    public boolean satisfiedBy(NetworkSpecifier other) {
    public boolean satisfiedBy(NetworkSpecifier other) {
        /*
        /*
         * The method is called by a NetworkRequest to see if it is satisfied by a proposed
         * The method is called by a NetworkRequest to see if it is satisfied by a proposed
@@ -64,11 +69,11 @@ public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements
    }
    }


    @Override
    @Override
    public void writeToParcel(Parcel dest, int flags) {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        // Nothing to write.
        // Nothing to write.
    }
    }


    public static final @android.annotation.NonNull Parcelable.Creator<MatchAllNetworkSpecifier> CREATOR =
    public static final @NonNull Parcelable.Creator<MatchAllNetworkSpecifier> CREATOR =
            new Parcelable.Creator<MatchAllNetworkSpecifier>() {
            new Parcelable.Creator<MatchAllNetworkSpecifier>() {
        public MatchAllNetworkSpecifier createFromParcel(Parcel in) {
        public MatchAllNetworkSpecifier createFromParcel(Parcel in) {
            return new MatchAllNetworkSpecifier();
            return new MatchAllNetworkSpecifier();