Merge "Temporarily change uid to appId" am: 1e4d4001f4 am: 28a6b24430
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1770606 Change-Id: I21f33adcb478800139621a6730ab4740647711a9
This commit is contained in:
@@ -281,7 +281,14 @@ public class PermissionMonitor {
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
synchronized void updateUidsAllowedOnRestrictedNetworks(final Set<Integer> uids) {
|
synchronized void updateUidsAllowedOnRestrictedNetworks(final Set<Integer> uids) {
|
||||||
mUidsAllowedOnRestrictedNetworks.clear();
|
mUidsAllowedOnRestrictedNetworks.clear();
|
||||||
mUidsAllowedOnRestrictedNetworks.addAll(uids);
|
// This is necessary for the app id to match in isUidAllowedOnRestrictedNetworks, and will
|
||||||
|
// grant the permission to all uids associated with the app ID. This is safe even if the app
|
||||||
|
// is only installed on some users because the uid cannot match some other app – this uid is
|
||||||
|
// in effect not installed and can't be run.
|
||||||
|
// TODO (b/192431153): Change appIds back to uids.
|
||||||
|
for (int uid : uids) {
|
||||||
|
mUidsAllowedOnRestrictedNetworks.add(UserHandle.getAppId(uid));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|||||||
Reference in New Issue
Block a user