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

Commit 2b7b7296 authored by Christopher Tate's avatar Christopher Tate Committed by Automerger Merge Worker
Browse files

Fix side effects of trace-ipc and dumpheap commands am: 4c0b9a5f am:...

Fix side effects of trace-ipc and dumpheap commands am: 4c0b9a5f am: 5518a714 am: cb8e4e8d am: 8ebf5ba9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14982641

Change-Id: I68d9405667fda149bb75532b8fd9c6f25b7485b6
parents 07f8164b 8ebf5ba9
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ import com.android.internal.util.MemInfoReader;
import com.android.server.compat.PlatformCompat;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -787,8 +786,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
            return -1;
        }

        File file = new File(filename);
        file.delete();
        // Writes an error message to stderr on failure
        ParcelFileDescriptor fd = openFileForSystem(filename, "w");
        if (fd == null) {
            return -1;
@@ -945,8 +943,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
        pw.println("File: " + heapFile);
        pw.flush();

        File file = new File(heapFile);
        file.delete();
        // Writes an error message to stderr on failure
        ParcelFileDescriptor fd = openFileForSystem(heapFile, "w");
        if (fd == null) {
            return -1;