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

Commit c685eb42 authored by Rhed Jao's avatar Rhed Jao Committed by Android (Google) Code Review
Browse files

Merge "Enforce package visibility filter rules to the isTrusted api"

parents 3590b21d 289e1b78
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2046,6 +2046,11 @@ public class MediaSessionService extends SystemService implements Monitor {
                int controllerUid) {
            final int uid = Binder.getCallingUid();
            final int userId = UserHandle.getUserHandleForUid(uid).getIdentifier();
            if (LocalServices.getService(PackageManagerInternal.class)
                    .filterAppAccess(controllerPackageName, uid, userId)) {
                // The controllerPackageName is not visible to the caller.
                return false;
            }
            final long token = Binder.clearCallingIdentity();
            try {
                // Don't perform check between controllerPackageName and controllerUid.