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 Change-Id: I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1
This commit is contained in:
@@ -310,7 +310,7 @@ public class PermissionMonitor {
|
|||||||
if (appInfo == null) return false;
|
if (appInfo == null) return false;
|
||||||
// Check whether package's uid is in allowed on restricted networks uid list. If so, this
|
// Check whether package's uid is in allowed on restricted networks uid list. If so, this
|
||||||
// uid can have netd system permission.
|
// uid can have netd system permission.
|
||||||
return mUidsAllowedOnRestrictedNetworks.contains(appInfo.uid);
|
return mUidsAllowedOnRestrictedNetworks.contains(UserHandle.getAppId(appInfo.uid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|||||||
Reference in New Issue
Block a user