Merge "Add missing isShellUser check" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
455470d3b2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user