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

Commit 79e26e17 authored by Gavin Corkery's avatar Gavin Corkery Committed by Automerger Merge Worker
Browse files

Merge "Store ANR traces in internal directory" am: 75dbd5e9 am: d4f4edcb am: 0fadd9c9

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1592374

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7e4230e2ec11a7da4e0bc3a5829bd4eccb4d9325
parents 09c142e6 0fadd9c9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2061,7 +2061,7 @@ static void DumpstateWifiOnly() {
}

Dumpstate::RunStatus Dumpstate::DumpTraces(const char** path) {
    const std::string temp_file_pattern = "/data/anr/dumptrace_XXXXXX";
    const std::string temp_file_pattern = ds.bugreport_internal_dir_ + "/dumptrace_XXXXXX";
    const size_t buf_size = temp_file_pattern.length() + 1;
    std::unique_ptr<char[]> file_name_buf(new char[buf_size]);
    memcpy(file_name_buf.get(), temp_file_pattern.c_str(), buf_size);
@@ -3068,6 +3068,9 @@ void Dumpstate::CleanupTmpFiles() {
    android::os::UnlinkAndLogOnError(tmp_path_);
    android::os::UnlinkAndLogOnError(screenshot_path_);
    android::os::UnlinkAndLogOnError(path_);
    if (dump_traces_path != nullptr) {
        android::os::UnlinkAndLogOnError(dump_traces_path);
    }
}

void Dumpstate::EnableParallelRunIfNeeded() {