diff options
| author | 2018-12-12 03:00:26 -0800 | |
|---|---|---|
| committer | 2018-12-12 03:00:26 -0800 | |
| commit | c88d050d4424a7cba8b60fc4a9a832493bd44c0b (patch) | |
| tree | 3fc5929fbd5d30b0381463cf109cade986761489 /cmds/dumpstate/dumpstate.cpp | |
| parent | e546841c7acd72b8b6dc3af72210ff11cb1f0f73 (diff) | |
| parent | ab59d1f81a678d2a01a30dccf55ecb7e4c5cf3ac (diff) | |
Merge "Fix adb bugreport and add bugreport unit tests." am: cb47a08e14
am: ab59d1f81a
Change-Id: I21e480b5286c3b9ad7ac70305235e630437b318e
Diffstat (limited to 'cmds/dumpstate/dumpstate.cpp')
| -rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 0f2996e208..142c4cda17 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -2042,6 +2042,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"; } } @@ -2082,12 +2084,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()) { @@ -2095,6 +2099,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") { |