Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b82b2a2 authored by Tony Mak's avatar Tony Mak Committed by android-build-merger
Browse files

Merge "Get application info in the correct user id" into pi-dev am: df753092

am: ae6a30d4

Change-Id: If51fa62fc0aa87482b3d43b7b91bfb49732b163c
parents 863c4e32 ae6a30d4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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.