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

Commit ee7692c2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add missing isShellUser check" into qt-dev am: 8416431f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12171286

Change-Id: I45f0fa7f6d99d1bf7572aa53f084115a1cb920e5
parents 74cc0e4f 8416431f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3171,6 +3171,10 @@ public class ActivityManagerService extends IActivityManager.Stub
    @Override
    public boolean setProcessMemoryTrimLevel(String process, int userId, int level)
            throws RemoteException {
        if (!isCallerShell()) {
            EventLog.writeEvent(0x534e4554, 160390416, Binder.getCallingUid(), "");
            throw new SecurityException("Only shell can call it");
        }
        synchronized (this) {
            final ProcessRecord app = findProcessLocked(process, userId, "setProcessMemoryTrimLevel");
            if (app == null) {