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

Commit 9aa7258a authored by Zoltan Szatmary-Ban's avatar Zoltan Szatmary-Ban
Browse files

Data usage API: any uid is accessible to system apps running in any user

This CL mostly affects Settings app as it can run in a user different
than UserHandle.OWNER. Since it is a system app it should have access
to all uid's data usage, regardless of which user it is currently running
in.

Bug: 19967498
Change-Id: I4a7787134d998457f7e2a1029183d44d9584083e
parent 80d4bd84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ public class NetworkStatsCollection implements FileRotator.Reader {
    }

    private static boolean isAccessibleToUser(int uid, int callerUid) {
        return callerUid == android.os.Process.SYSTEM_UID ||
        return UserHandle.getAppId(callerUid) == android.os.Process.SYSTEM_UID ||
                uid == android.os.Process.SYSTEM_UID || uid == UID_REMOVED || uid == UID_TETHERING
                || UserHandle.getUserId(uid) == UserHandle.getUserId(callerUid);
    }