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

Commit 808afb5f authored by Orion Hodson's avatar Orion Hodson
Browse files

ActivityManager: process stop needs a process to stop

Make process a required argument for am process stop to avoid silent
failure.

Minor usage clean-up for am process commands.

Bug: 129892812
Test: manual

(cherry picked from commit 4e6a314e)

Change-Id: Ia79e3c7e8b4cbc3eb6ab548b5cd0f61306875fb0
Merged-In: Ib5f3c225c79af65f66c22b24abbef210bb383c8e
parent 16f682ca
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -826,7 +826,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
                    return -1;
                }
            }
            process = getNextArg();
            process = getNextArgRequired();
        } else {
            // Compatibility with old syntax: process is specified first.
            process = cmd;
@@ -2998,15 +2998,22 @@ final class ActivityManagerShellCommand extends ShellCommand {
            pw.println("      start: start tracing IPC transactions.");
            pw.println("      stop: stop tracing IPC transactions and dump the results to file.");
            pw.println("      --dump-file <FILE>: Specify the file the trace should be dumped to.");
            pw.println("  profile [start|stop] [--user <USER_ID> current] [--sampling INTERVAL]");
            pw.println("          [--streaming] <PROCESS> <FILE>");
            pw.println("      Start and stop profiler on a process.  The given <PROCESS> argument");
            pw.println("  profile start [--user <USER_ID> current]");
            pw.println("          [--sampling INTERVAL | --streaming] <PROCESS> <FILE>");
            pw.println("      Start profiler on a process.  The given <PROCESS> argument");
            pw.println("        may be either a process name or pid.  Options are:");
            pw.println("      --user <USER_ID> | current: When supplying a process name,");
            pw.println("          specify user of process to profile; uses current user if not specified.");
            pw.println("          specify user of process to profile; uses current user if not");
            pw.println("          specified.");
            pw.println("      --sampling INTERVAL: use sample profiling with INTERVAL microseconds");
            pw.println("          between samples");
            pw.println("      --streaming: stream the profiling output to the specified file");
            pw.println("          between samples.");
            pw.println("      --streaming: stream the profiling output to the specified file.");
            pw.println("  profile stop [--user <USER_ID> current] <PROCESS>");
            pw.println("      Stop profiler on a process.  The given <PROCESS> argument");
            pw.println("        may be either a process name or pid.  Options are:");
            pw.println("      --user <USER_ID> | current: When supplying a process name,");
            pw.println("          specify user of process to profile; uses current user if not");
            pw.println("          specified.");
            pw.println("  dumpheap [--user <USER_ID> current] [-n] [-g] <PROCESS> <FILE>");
            pw.println("      Dump the heap of a process.  The given <PROCESS> argument may");
            pw.println("        be either a process name or pid.  Options are:");