Merge "Add missing isShellUser check" into rvc-dev am: 455470d3b2 am: 6ce5f1dbf4 am: 86e2ad1776
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12099336 Change-Id: Id3a5275f5dfb690fdd20370e06ee3bd715799d8f
This commit is contained in:
@@ -3318,6 +3318,10 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
@Override
|
@Override
|
||||||
public boolean setProcessMemoryTrimLevel(String process, int userId, int level)
|
public boolean setProcessMemoryTrimLevel(String process, int userId, int level)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
|
if (!isCallerShell()) {
|
||||||
|
EventLog.writeEvent(0x534e4554, 160390416, Binder.getCallingUid(), "");
|
||||||
|
throw new SecurityException("Only shell can call it");
|
||||||
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
final ProcessRecord app = findProcessLocked(process, userId, "setProcessMemoryTrimLevel");
|
final ProcessRecord app = findProcessLocked(process, userId, "setProcessMemoryTrimLevel");
|
||||||
if (app == null) {
|
if (app == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user