Moved DumpstateUtil.h functions to its own namespace.
Also make it a shared library.
Test: dumpstate_test passes
Test: manual verification
Bug: 26379932
Change-Id: I75dd3ef9fec3ac692a132bdd8c68307c1a1ee602
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index 7ee5959..6cc430d 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -53,6 +53,11 @@
#include "DumpstateInternal.h"
+// TODO: remove once moved to namespace
+using android::os::dumpstate::CommandOptions;
+using android::os::dumpstate::DumpFileToFd;
+using android::os::dumpstate::PropertiesHelper;
+
static const int TRACE_DUMP_TIMEOUT_MS = 10000; // 10 seconds
/* Most simple commands have 10 as timeout, so 5 is a good estimate */
@@ -64,9 +69,6 @@
const CommandOptions& options = CommandOptions::DEFAULT) {
return ds.RunCommand(title, full_command, options);
}
-bool Dumpstate::IsUserBuild() {
- return PropertiesHelper::IsUserBuild();
-}
/* list of native processes to include in the native dumps */
// This matches the /proc/pid/exe link instead of /proc/pid/cmdline.