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

Commit ad60ef88 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Make getNetworkSpecifier() public API."

parents ea1b85a5 7412d7aa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28903,6 +28903,7 @@ package android.net {
  public class NetworkRequest implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public android.net.NetworkSpecifier getNetworkSpecifier();
    method public boolean hasCapability(int);
    method public boolean hasTransport(int);
    method public void writeToParcel(android.os.Parcel, int);
+9 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.net;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
@@ -461,6 +462,14 @@ public class NetworkRequest implements Parcelable {
        return networkCapabilities.hasTransport(transportType);
    }

    /**
     * @see Builder#setNetworkSpecifier(NetworkSpecifier)
     */
    @Nullable
    public NetworkSpecifier getNetworkSpecifier() {
        return networkCapabilities.getNetworkSpecifier();
    }

    public String toString() {
        return "NetworkRequest [ " + type + " id=" + requestId +
                (legacyType != ConnectivityManager.TYPE_NONE ? ", legacyType=" + legacyType : "") +