From ffa2b4b6204c09229f2e520f33cfa4d20de8880a Mon Sep 17 00:00:00 2001 From: Michael Eastwood Date: Fri, 9 Jul 2021 08:31:20 -0700 Subject: [PATCH] Attach the latest .cpa file collected due to a high drop rate to bugreports. Bug: 191169822 Test: `adb bugreport`, unzip, `tar -xvf dumpstate_board.bin`, find expected .cpa file Change-Id: I8a16a594b738bbd7b985edcbac44f5451089f010 --- dumpstate/DumpstateDevice.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 4d88c023..e5d53785 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -210,7 +210,9 @@ void dumpCameraLogs(int fd, const std::string &destDir) { const std::string cameraDestDir = destDir + "/camera"; RunCommandToFd(fd, "MKDIR CAMERA LOG", {"/vendor/bin/mkdir", "-p", cameraDestDir.c_str()}, CommandOptions::WithTimeout(2).Build()); - dumpLogs(fd, kCameraLogDir, cameraDestDir, 1, "session-ended-"); + // Attach 2 latest sessions (in case the user is running concurrent sessions). + dumpLogs(fd, kCameraLogDir, cameraDestDir, 2, "session-ended-"); + dumpLogs(fd, kCameraLogDir, cameraDestDir, 2, "high-drop-rate-"); } timepoint_t startSection(int fd, const std::string §ionName) {