Merge "Expose netId by adding getter API" into rvc-dev am: ad76cd9864

Change-Id: I826f8a561b2bd0f456302247f90d26ffc42c42df
This commit is contained in:
Junyu Lai
2020-03-20 11:23:27 +00:00
committed by Automerger Merge Worker

View File

@@ -64,7 +64,7 @@ public class Network implements Parcelable {
* The unique id of the network. * The unique id of the network.
* @hide * @hide
*/ */
@SystemApi @UnsupportedAppUsage
public final int netId; public final int netId;
// Objects used to perform per-network operations such as getSocketFactory // Objects used to perform per-network operations such as getSocketFactory
@@ -169,6 +169,17 @@ public class Network implements Parcelable {
return new Network(netId, true); return new Network(netId, true);
} }
/**
* Get the unique id of the network.
*
* @hide
*/
@TestApi
@SystemApi
public int getNetId() {
return netId;
}
/** /**
* Returns a netid marked with the Private DNS bypass flag. * Returns a netid marked with the Private DNS bypass flag.
* *