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

Commit 83b1d263 authored by Eugene Susla's avatar Eugene Susla Committed by Android (Google) Code Review
Browse files

Merge "Fix CDM package check"

parents bb7189f4 a0bf170f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -391,7 +391,10 @@ public class CompanionDeviceManagerService extends SystemService implements Bind

            checkArgument(getCallingUserId() == userId,
                    "Must be called by either same user or system");
            mAppOpsManager.checkPackage(Binder.getCallingUid(), pkg);
            int callingUid = Binder.getCallingUid();
            if (mAppOpsManager.checkPackage(callingUid, pkg) != AppOpsManager.MODE_ALLOWED) {
                throw new SecurityException(pkg + " doesn't belong to uid " + callingUid);
            }
        }

        @Override