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

Commit 88c39a18 authored by Pavel Maltsev's avatar Pavel Maltsev Committed by android-build-merger
Browse files

Merge "Add hasUnwantedCapability method" into pi-dev

am: c5138d26

Change-Id: I7feec81a3f1525055030ee16f34b8e7251e79b9b
parents 0580e6b7 c5138d26
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -27259,6 +27259,7 @@ package android.net {
    method public int describeContents();
    method public boolean hasCapability(int);
    method public boolean hasTransport(int);
    method public boolean hasUnwantedCapability(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.net.NetworkRequest> CREATOR;
  }
+9 −0
Original line number Diff line number Diff line
@@ -172,6 +172,8 @@ public class NetworkRequest implements Parcelable {
         * If the given capability was previously added to the list of unwanted capabilities
         * then the capability will also be removed from the list of unwanted capabilities.
         *
         * @see #addUnwantedCapability(int)
         *
         * @param capability The capability to add.
         * @return The builder to facilitate chaining
         *         {@code builder.addCapability(...).addCapability();}.
@@ -435,6 +437,13 @@ public class NetworkRequest implements Parcelable {
        return networkCapabilities.hasCapability(capability);
    }

    /**
     * @see Builder#addUnwantedCapability(int)
     */
    public boolean hasUnwantedCapability(@NetCapability int capability) {
        return networkCapabilities.hasUnwantedCapability(capability);
    }

    /**
     * @see Builder#addTransportType(int)
     */