diff options
| author | 2021-02-25 18:24:15 +0000 | |
|---|---|---|
| committer | 2021-02-25 18:24:15 +0000 | |
| commit | 79e26e175fe62e1dc31a6f587a3a9f999db59db2 (patch) | |
| tree | a8492e4a0b65a923e04c292bf9b14ff20d752178 | |
| parent | 09c142e6660f4e7e866eab9fe2cfdc89cd82b48e (diff) | |
| parent | 0fadd9c98c402cd40995f309c15c2325b2d65e04 (diff) | |
Merge "Store ANR traces in internal directory" am: 75dbd5e96c am: d4f4edcbda am: 0fadd9c98c
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1592374
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I7e4230e2ec11a7da4e0bc3a5829bd4eccb4d9325
| -rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 45959e4cc9..cfc405a840 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -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() { |