Add accessUids to NetworkCapabilities.
For now, all entry points reject this. Followup changes will allow the supported use cases. Test: new unit tests and CTS for this in this patch Change-Id: I7262811a2e46336d3bb63c80886fc0578a36da94
This commit is contained in:
parent
1522857564
commit
9a30acf744
1 changed files with 269 additions and 18 deletions
|
|
@ -2099,6 +2099,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
newNc.setAdministratorUids(new int[0]);
|
||||
if (!checkAnyPermissionOf(
|
||||
callerPid, callerUid, android.Manifest.permission.NETWORK_FACTORY)) {
|
||||
newNc.setAccessUids(new ArraySet<>());
|
||||
newNc.setSubscriptionIds(Collections.emptySet());
|
||||
}
|
||||
|
||||
|
|
@ -6210,6 +6211,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
if (nc.isPrivateDnsBroken()) {
|
||||
throw new IllegalArgumentException("Can't request broken private DNS");
|
||||
}
|
||||
if (nc.hasAccessUids()) {
|
||||
throw new IllegalArgumentException("Can't request access UIDs");
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Set the mini sdk to 31 and remove @TargetApi annotation when b/205923322 is addressed.
|
||||
|
|
|
|||
Loading…
Reference in a new issue