summaryrefslogtreecommitdiff
path: root/cmds/dumpstate/dumpstate.cpp
diff options
context:
space:
mode:
author Abhijeet Kaur <abkaur@google.com> 2018-12-12 04:19:09 -0800
committer android-build-merger <android-build-merger@google.com> 2018-12-12 04:19:09 -0800
commitec2d87ab6ecaa721d7e46a438156bcab89a12459 (patch)
tree38efd78e049840ae11f4bd60cc3a48052c345955 /cmds/dumpstate/dumpstate.cpp
parentcbefc99124d9332e4bfaee237270c1ead5a8e30c (diff)
parentc88d050d4424a7cba8b60fc4a9a832493bd44c0b (diff)
Merge "Fix adb bugreport and add bugreport unit tests." am: cb47a08e14 am: ab59d1f81a
am: c88d050d44 Change-Id: I43703b6403f7dd6fcffac551f6eb2153263170db
Diffstat (limited to 'cmds/dumpstate/dumpstate.cpp')
-rw-r--r--cmds/dumpstate/dumpstate.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index be10232d09..2c938326d6 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -2048,6 +2048,8 @@ static inline const char* ModeToString(Dumpstate::BugreportMode mode) {
return "BUGREPORT_TELEPHONY";
case Dumpstate::BugreportMode::BUGREPORT_WIFI:
return "BUGREPORT_WIFI";
+ case Dumpstate::BugreportMode::BUGREPORT_DEFAULT:
+ return "BUGREPORT_DEFAULT";
}
}
@@ -2088,12 +2090,14 @@ static void SetOptionsFromMode(Dumpstate::BugreportMode mode, Dumpstate::DumpOpt
options->do_fb = true;
options->do_broadcast = true;
break;
+ case Dumpstate::BugreportMode::BUGREPORT_DEFAULT:
+ break;
}
}
static Dumpstate::BugreportMode getBugreportModeFromProperty() {
- // If the system property is not set, it's assumed to be a full bugreport.
- Dumpstate::BugreportMode mode = Dumpstate::BugreportMode::BUGREPORT_FULL;
+ // If the system property is not set, it's assumed to be a default bugreport.
+ Dumpstate::BugreportMode mode = Dumpstate::BugreportMode::BUGREPORT_DEFAULT;
std::string extra_options = android::base::GetProperty(PROPERTY_EXTRA_OPTIONS, "");
if (!extra_options.empty()) {
@@ -2101,6 +2105,8 @@ static Dumpstate::BugreportMode getBugreportModeFromProperty() {
// Currently, it contains the type of the requested bugreport.
if (extra_options == "bugreportplus") {
mode = Dumpstate::BugreportMode::BUGREPORT_INTERACTIVE;
+ } else if (extra_options == "bugreportfull") {
+ mode = Dumpstate::BugreportMode::BUGREPORT_FULL;
} else if (extra_options == "bugreportremote") {
mode = Dumpstate::BugreportMode::BUGREPORT_REMOTE;
} else if (extra_options == "bugreportwear") {