diff options
| -rw-r--r-- | cmds/dumpstate/DumpstateService.cpp | 8 | ||||
| -rw-r--r-- | cmds/dumpstate/DumpstateService.h | 5 | ||||
| -rw-r--r-- | cmds/dumpstate/binder/android/os/IDumpstate.aidl | 8 |
3 files changed, 16 insertions, 5 deletions
diff --git a/cmds/dumpstate/DumpstateService.cpp b/cmds/dumpstate/DumpstateService.cpp index 849eb44298..909bdd7134 100644 --- a/cmds/dumpstate/DumpstateService.cpp +++ b/cmds/dumpstate/DumpstateService.cpp @@ -98,9 +98,11 @@ binder::Status DumpstateService::setListener(const std::string& name, return binder::Status::ok(); } -binder::Status DumpstateService::startBugreport(int, int bugreport_mode, int32_t* returned_id) { - // TODO(111441001): return a request id here. - *returned_id = -1; +binder::Status DumpstateService::startBugreport(const android::base::unique_fd& /* bugreportFd */, + const android::base::unique_fd& /* screenshotFd */, + int bugreport_mode, + const sp<IDumpstateListener>& /* listener */) { + // TODO(b/111441001): Pass in fds & other arguments to DumpOptions. MYLOGI("startBugreport() with mode: %d\n", bugreport_mode); if (bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_FULL && diff --git a/cmds/dumpstate/DumpstateService.h b/cmds/dumpstate/DumpstateService.h index 58095b38ff..1736ae8066 100644 --- a/cmds/dumpstate/DumpstateService.h +++ b/cmds/dumpstate/DumpstateService.h @@ -20,6 +20,7 @@ #include <mutex> #include <vector> +#include <android-base/unique_fd.h> #include <binder/BinderService.h> #include "android/os/BnDumpstate.h" @@ -41,7 +42,9 @@ class DumpstateService : public BinderService<DumpstateService>, public BnDumpst bool getSectionDetails, sp<IDumpstateToken>* returned_token) override; - binder::Status startBugreport(int fd, int bugreport_mode, int32_t* returned_id) override; + binder::Status startBugreport(const android::base::unique_fd& bugreportFd, + const android::base::unique_fd& screenshotFd, int bugreport_mode, + const sp<IDumpstateListener>& listener) override; private: Dumpstate& ds_; diff --git a/cmds/dumpstate/binder/android/os/IDumpstate.aidl b/cmds/dumpstate/binder/android/os/IDumpstate.aidl index 617eab3ac0..ba3e290fd9 100644 --- a/cmds/dumpstate/binder/android/os/IDumpstate.aidl +++ b/cmds/dumpstate/binder/android/os/IDumpstate.aidl @@ -63,6 +63,12 @@ interface IDumpstate { /* * Starts a bugreport in the background. + * + * @param bugreportFd the file to which the zipped bugreport should be written + * @param screenshotFd the file to which screenshot should be written; optional + * @param bugreportMode the mode that specifies other run time options; must be one of above + * @param listener callback for updates; optional */ - int startBugreport(int fd, int bugreportMode); + void startBugreport(FileDescriptor bugreportFd, FileDescriptor screenshotFd, int bugreportMode, + IDumpstateListener listener); } |