Merge "binder: Fix bugreport and dumpsys not printing full info" into rvc-dev am: 69e3aad47c
Change-Id: Ia1132d755a6219b65aa17ddc42bf4152bef1af56
diff --git a/src/binder/iiorap_impl.cc b/src/binder/iiorap_impl.cc
index 478196c..8c71959 100644
--- a/src/binder/iiorap_impl.cc
+++ b/src/binder/iiorap_impl.cc
@@ -205,7 +205,10 @@
::android::String16 arg_prev;
for (const ::android::String16& arg : args) {
bool unknown = false;
- if (arg == ::android::String16("--refresh-properties")) {
+ if (arg == ::android::String16("--all") || arg == ::android::String16("-a")) {
+ // using 'dumpsys' or 'bugreport' passes a single '-a' flag to this function.
+ service_params_.event_manager_->Dump(/*borrow*/printer);
+ } else if (arg == ::android::String16("--refresh-properties")) {
service_params_.event_manager_->RefreshSystemProperties(/*borrow*/printer);
printer.printLine("System properties refreshed.");
} else if (arg == ::android::String16("--compile-package")) {
@@ -235,11 +238,17 @@
if (unknown && arg != ::android::String16("--help")) {
printer.printLine("Invalid arguments.");
printer.printLine("");
+
+ printer.printLine("Arguments were:");
+ for (const ::android::String16& arg16 : args) {
+ printer.printFormatLine(" '%s'", String16ToStdString(arg16).c_str());
+ }
+ printer.printLine("");
}
if (unknown || arg == ::android::String16("--help")) {
printer.printLine("Iorapd dumpsys commands:");
- printer.printLine(" (0 args): Print state information for debugging iorapd.");
+ printer.printLine(" (none),--all,-a: Print state information for debugging iorapd.");
printer.printLine(" --help: Display this help menu");
printer.printLine(" --compile-package <name>: Compile single package on device");
printer.printLine(" --purge-package <name>: Delete database entries/files for package");