Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b25dd0bc authored by Nandana Dutt's avatar Nandana Dutt Committed by android-build-merger
Browse files

Merge "Add more arguments to Dumpstate binder interface" am: 68f8a18e

am: 2172a6cb

Change-Id: Iac193025f03a879c5512c541cc58fe4df0864030
parents 750fe866 2172a6cb
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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 &&
+4 −1
Original line number Diff line number Diff line
@@ -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_;
+7 −1
Original line number Diff line number Diff line
@@ -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);
}