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

Commit 6a7aac4a authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by Android (Google) Code Review
Browse files

Merge "Use sharedUserId as package name if there are collisions"

parents e341d4a8 b270fc22
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -106,7 +106,13 @@ public class BinderCallsStatsService extends Binder {
        }
        Map<Integer,String> map = new HashMap<>();
        for (PackageInfo pkg : packages) {
            map.put(pkg.applicationInfo.uid, pkg.packageName);
            String name = pkg.packageName;
            int uid = pkg.applicationInfo.uid;
            // Use sharedUserId string as package name if there are collisions
            if (pkg.sharedUserId != null && map.containsKey(uid)) {
                name = "shared:" + pkg.sharedUserId;
            }
            map.put(uid, name);
        }
        return map;
    }