OSDN Git Service

use findProcess instead of getProcess
authorJohn Reck <jreck@google.com>
Fri, 24 Jul 2015 00:36:13 +0000 (17:36 -0700)
committerJohn Reck <jreck@google.com>
Fri, 24 Jul 2015 00:37:23 +0000 (00:37 +0000)
Bug: 22701182
Change-Id: I2ec56c55c49401f2f213bbd318e867fd73b37672

cmds/am/src/com/android/commands/am/Am.java
services/core/java/com/android/server/am/ActivityManagerService.java

index d952dfc..96c0dbd 100644 (file)
@@ -295,7 +295,7 @@ public class Am extends BaseCommand {
                 "\n" +
                 "am get-inactive: returns the inactive state of an app.\n" +
                 "\n" +
-                " am send-trim-memory: Send a memory trim event to a <PROCESS>.\n" +
+                "am send-trim-memory: Send a memory trim event to a <PROCESS>.\n" +
                 "\n" +
                 "<INTENT> specifications include these flags and arguments:\n" +
                 "    [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]\n" +
index 4d9695d..bad0668 100644 (file)
@@ -3652,7 +3652,7 @@ public final class ActivityManagerService extends ActivityManagerNative
     @Override
     public boolean setProcessMemoryTrimLevel(String process, int userId, int level) {
         synchronized (this) {
-            final ProcessRecord app = getProcessRecordLocked(process, userId, true);
+            final ProcessRecord app = findProcessLocked(process, userId, "setProcessMemoryTrimLevel");
             if (app == null) {
                 return false;
             }