Expose netId by adding getter API

Bug: 151156820
Test: m
      atest TetetheringTests

Clean CP from ag/10747732

Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
Merged-In: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
This commit is contained in:
markchien
2020-03-18 08:43:07 +08:00
committed by Chalard Jean
parent f06634ae70
commit 9d26f92289

View File

@@ -65,7 +65,7 @@ public class Network implements Parcelable {
* The unique id of the network.
* @hide
*/
@SystemApi
@UnsupportedAppUsage
public final int netId;
// Objects used to perform per-network operations such as getSocketFactory
@@ -170,6 +170,17 @@ public class Network implements Parcelable {
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.
*