Separate options parsing from running dumpstate
This refactor allows accepting options in other ways, for eg
via binder calls.
BUG: 111441001
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Test: adb bugreport
Test: interactive bugreport
Change-Id: Id27c917a3b51e1b9c0485ef3ff473b3cf22243df
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index 77f09b7..4ad5c4b 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -916,7 +916,7 @@
bool max_changed = progress_->Inc(delta_sec);
// ...but only notifiy listeners when necessary.
- if (!update_progress_) return;
+ if (!options_->do_progress_updates) return;
int progress = progress_->Get();
int max = progress_->GetMax();