summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nandana Dutt <nandana@google.com> 2019-01-10 13:48:46 -0800
committer android-build-merger <android-build-merger@google.com> 2019-01-10 13:48:46 -0800
commit427fb957faecacb86495c286feee6ab173895f70 (patch)
treee6188edb3135b1ac6b7b66559555207279f8a208
parent72993231fc5eb7fb21559de174b29e3b484a509c (diff)
parentb25dd0bcaed0d9db54a92c9bdadea09fd6ca0ac6 (diff)
Merge "Add more arguments to Dumpstate binder interface" am: 68f8a18e71 am: 2172a6cb47
am: b25dd0bcae Change-Id: I9691d3a4a9d66df2eaaa491098e680021dff83f3
-rw-r--r--cmds/dumpstate/DumpstateService.cpp8
-rw-r--r--cmds/dumpstate/DumpstateService.h5
-rw-r--r--cmds/dumpstate/binder/android/os/IDumpstate.aidl8
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);
}