Merge "Make getNetworkSpecifier() public API."
am: ad60ef88e0 Change-Id: I92d0b7cb179e1c0f5cb789c2c668254732fbf30a
This commit is contained in:
@@ -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 : "") +
|
||||
|
||||
Reference in New Issue
Block a user