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

Commit 7e0989d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "am dumpheap throws error when arguments are after file" into main

parents 66f47484 40bc741e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1334,6 +1334,12 @@ final class ActivityManagerShellCommand extends ShellCommand {
            heapFile = "/data/local/tmp/heapdump-" + logNameTimeString + ".prof";
        }

        String argAfterHeapFile = getNextArg();
        if (argAfterHeapFile != null) {
            err.println("Error: Arguments cannot be placed after the heap file");
            return -1;
        }

        // Writes an error message to stderr on failure
        ParcelFileDescriptor fd = openFileForSystem(heapFile, "w");
        if (fd == null) {