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

Commit 1dc03130 authored by Jackal Guo's avatar Jackal Guo Committed by Android (Google) Code Review
Browse files

Merge "Only allow privileged callers setting visibility logging"

parents 84bc7ac1 70b71b51
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6423,6 +6423,8 @@ public class PackageManagerService implements PackageSender, TestUtilityService

        @Override
        public void setVisibilityLogging(String packageName, boolean enable) {
            PackageManagerServiceUtils.enforceSystemOrRootOrShell(
                    "Only the system or shell can set visibility logging.");
            final PackageStateInternal packageState =
                    snapshot().getPackageStateInternal(packageName);
            if (packageState == null) {