Merge cherrypicks of [3801524, 3800394, 3800228] into pi-release
Change-Id: I8dbf49fa5dc11dd147f118b597e2e07a1b231115
This commit is contained in:
@@ -202,7 +202,9 @@ public class PermissionMonitor {
|
||||
// Only using the first package name. There may be multiple names if multiple
|
||||
// apps share the same UID, but in that case they also share permissions so
|
||||
// querying with any of the names will return the same results.
|
||||
final PackageInfo app = mPackageManager.getPackageInfo(names[0], GET_PERMISSIONS);
|
||||
int userId = UserHandle.getUserId(uid);
|
||||
final PackageInfo app = mPackageManager.getPackageInfoAsUser(
|
||||
names[0], GET_PERMISSIONS, userId);
|
||||
return hasUseBackgroundNetworksPermission(app);
|
||||
} catch (NameNotFoundException e) {
|
||||
// App not found.
|
||||
|
||||
Reference in New Issue
Block a user