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

Commit 9dd0968c authored by Aaron Huang's avatar Aaron Huang Committed by Gerrit Code Review
Browse files

Merge "Make MatchAllNetworkSpecifier constructor @SystemApi"

parents 967232ee adfdf4da
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4350,6 +4350,13 @@ package android.net {
    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 {
    ctor public Network(@NonNull android.net.Network);
    method @NonNull public android.net.Network getPrivateDnsBypassingCopy();
+7 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.net;

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

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

    /** @hide */
    public boolean satisfiedBy(NetworkSpecifier other) {
        /*
         * 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
    public void writeToParcel(Parcel dest, int flags) {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        // 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>() {
        public MatchAllNetworkSpecifier createFromParcel(Parcel in) {
            return new MatchAllNetworkSpecifier();