Merge "Temporarily change uid to appId" am: 1e4d4001f4 am: 28a6b24430 am: dd1bb19405
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1770606 Change-Id: I463bbd643a0ad423ba6524029d51749810021fbe
This commit is contained in:
@@ -281,7 +281,14 @@ public class PermissionMonitor {
|
||||
@VisibleForTesting
|
||||
synchronized void updateUidsAllowedOnRestrictedNetworks(final Set<Integer> uids) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user