Use appId for looking up allowed on restricted networks uids list
aosp/1770606 change uid to appId when filling allowed on restricted networks uids list. So add UserHandle.getAppId() to ensure that uses appId for looking up the list. Bug: 192116643 Test: atest FrameworksNetTests Original-Change: https://android-review.googlesource.com/1773886 Merged-In: I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1 Change-Id: I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1
This commit is contained in:
committed by
Paul Hu
parent
3c20df39d0
commit
3c42fedeb5
@@ -303,7 +303,7 @@ public class PermissionMonitor {
|
||||
if (appInfo == null) return false;
|
||||
// Check whether package's uid is in allowed on restricted networks uid list. If so, this
|
||||
// uid can have netd system permission.
|
||||
return mUidsAllowedOnRestrictedNetworks.contains(appInfo.uid);
|
||||
return mUidsAllowedOnRestrictedNetworks.contains(UserHandle.getAppId(appInfo.uid));
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
||||
Reference in New Issue
Block a user