diff options
| author | 2020-03-10 02:08:55 +0800 | |
|---|---|---|
| committer | 2020-03-11 10:38:17 +0000 | |
| commit | f59c2b7ad16b19ba00765d75d38fec74fe8f9435 (patch) | |
| tree | a33eba2d753c14ea28a473b1c1bb53cf2ca49d2a /cmds/dumpstate/DumpstateService.cpp | |
| parent | 7190e99bf166c2cc71ed1c9de592f33eed6ad713 (diff) | |
Take screenshot only when screenshot is requested
- Take screenshot only when screenshot is requested for preventing from taking screenshot unnecessarily
BUG: 149525300
Test: Flash and test interactive/full bugreports generated using Shell, and Shell flow does not break during tests
Change-Id: Ie5cbe97f9e6e32fecc3d95893b9804b6e716c628
Diffstat (limited to 'cmds/dumpstate/DumpstateService.cpp')
| -rw-r--r-- | cmds/dumpstate/DumpstateService.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds/dumpstate/DumpstateService.cpp b/cmds/dumpstate/DumpstateService.cpp index 466575f2fa..a0b9cbbe20 100644 --- a/cmds/dumpstate/DumpstateService.cpp +++ b/cmds/dumpstate/DumpstateService.cpp @@ -84,7 +84,8 @@ binder::Status DumpstateService::startBugreport(int32_t calling_uid, android::base::unique_fd bugreport_fd, android::base::unique_fd screenshot_fd, int bugreport_mode, - const sp<IDumpstateListener>& listener) { + const sp<IDumpstateListener>& listener, + bool is_screenshot_requested) { MYLOGI("startBugreport() with mode: %d\n", bugreport_mode); // Ensure there is only one bugreport in progress at a time. @@ -118,7 +119,7 @@ binder::Status DumpstateService::startBugreport(int32_t calling_uid, std::unique_ptr<Dumpstate::DumpOptions> options = std::make_unique<Dumpstate::DumpOptions>(); options->Initialize(static_cast<Dumpstate::BugreportMode>(bugreport_mode), bugreport_fd, - screenshot_fd); + screenshot_fd, is_screenshot_requested); if (bugreport_fd.get() == -1 || (options->do_screenshot && screenshot_fd.get() == -1)) { MYLOGE("Invalid filedescriptor"); |