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

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

Merge "Add missing isShellUser check" into rvc-dev am: 455470d3

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

Change-Id: Icc68a75d127b732e1caf634c5801bd2fd177e7d1
parents 724c8773 455470d3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3318,6 +3318,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) {