Merge "Add missing isShellUser check" into qt-dev am: 8416431f37
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12171286 Change-Id: I45f0fa7f6d99d1bf7572aa53f084115a1cb920e5
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user