summaryrefslogtreecommitdiff
path: root/tools/incident_report/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/incident_report/main.cpp')
-rw-r--r--tools/incident_report/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/incident_report/main.cpp b/tools/incident_report/main.cpp
index bd1b973c7bdf..302d7395f3e4 100644
--- a/tools/incident_report/main.cpp
+++ b/tools/incident_report/main.cpp
@@ -452,9 +452,10 @@ main(int argc, char** argv)
bool adbIncidentWorkaround = true;
pid_t childPid = -1;
vector<string> sections;
+ const char* privacy = NULL;
int opt;
- while ((opt = getopt(argc, argv, "bhi:o:s:tw")) != -1) {
+ while ((opt = getopt(argc, argv, "bhi:o:s:twp:")) != -1) {
switch (opt) {
case 'b':
outputFormat = OUTPUT_PROTO;
@@ -477,6 +478,9 @@ main(int argc, char** argv)
case 'w':
adbIncidentWorkaround = false;
break;
+ case 'p':
+ privacy = optarg;
+ break;
default:
usage(stderr);
return 1;
@@ -526,7 +530,7 @@ main(int argc, char** argv)
}
// TODO: This is what the real implementation will be...
- char const** args = (char const**)malloc(sizeof(char*) * (6 + sections.size()));
+ char const** args = (char const**)malloc(sizeof(char*) * (8 + sections.size()));
int argpos = 0;
args[argpos++] = "adb";
if (adbSerial != NULL) {
@@ -535,6 +539,10 @@ main(int argc, char** argv)
}
args[argpos++] = "shell";
args[argpos++] = "incident";
+ if (privacy != NULL) {
+ args[argpos++] = "-p";
+ args[argpos++] = privacy;
+ }
for (vector<string>::const_iterator it=sections.begin(); it!=sections.end(); it++) {
args[argpos++] = it->c_str();
}