Add calling uid and calling package to startBugreport
This is so they can be passed to the consent service which will present
the user with a dialog and get their consent to share the bugreport with
the calling package.
Also update a few TODOs.
BUG: 111441001
Test: builds
Change-Id: I0a72c8e2d697f8a25f307cfce73c8f03ed1746e2
diff --git a/cmds/dumpstate/DumpstateService.cpp b/cmds/dumpstate/DumpstateService.cpp
index 6596fa2..1d5b738 100644
--- a/cmds/dumpstate/DumpstateService.cpp
+++ b/cmds/dumpstate/DumpstateService.cpp
@@ -43,7 +43,6 @@
static void* callAndNotify(void* data) {
Dumpstate& ds = *static_cast<Dumpstate*>(data);
- // TODO(111441001): Return status on listener.
ds.Run();
MYLOGE("Finished Run()\n");
return nullptr;
@@ -98,10 +97,16 @@
return binder::Status::ok();
}
-binder::Status DumpstateService::startBugreport(const android::base::unique_fd& bugreport_fd,
+// TODO(b/111441001): Hook up to consent service & copy final br only if user approves.
+binder::Status DumpstateService::startBugreport(int32_t /* calling_uid */,
+ const std::string& /* calling_package */,
+ const android::base::unique_fd& bugreport_fd,
const android::base::unique_fd& screenshot_fd,
int bugreport_mode,
const sp<IDumpstateListener>& listener) {
+ // TODO(b/111441001):
+ // 1. check DUMP permission (again)?
+ // 2. check if primary user? If non primary user the consent service will reject anyway.
MYLOGI("startBugreport() with mode: %d\n", bugreport_mode);
if (bugreport_mode != Dumpstate::BugreportMode::BUGREPORT_FULL &&