Let network requests see VPNs.
Test: runtest frameworks-net Test: also tested with VPN app Test: also cts passing Change-Id: I3b16caad7787c3c1f2921ca1583815c89efbadc5
This commit is contained in:
@@ -894,6 +894,17 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
*/
|
||||
private Set<UidRange> mUids = null;
|
||||
|
||||
/**
|
||||
* Convenience method to set the UIDs this network applies to to a single UID.
|
||||
* @hide
|
||||
*/
|
||||
public NetworkCapabilities setSingleUid(int uid) {
|
||||
final ArraySet<UidRange> identity = new ArraySet<>(1);
|
||||
identity.add(new UidRange(uid, uid));
|
||||
setUids(identity);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the list of UIDs this network applies to.
|
||||
* This makes a copy of the set so that callers can't modify it after the call.
|
||||
|
||||
Reference in New Issue
Block a user