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/DumpstateUtil.h b/cmds/dumpstate/DumpstateUtil.h
index c5ba83e..5a8ce5b 100644
--- a/cmds/dumpstate/DumpstateUtil.h
+++ b/cmds/dumpstate/DumpstateUtil.h
@@ -13,13 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef FRAMEWORK_NATIVE_CMD_DUMPSTATE_UTIL_H_
-#define FRAMEWORK_NATIVE_CMD_DUMPSTATE_UTIL_H_
+#ifndef ANDROID_OS_DUMPSTATE_UTIL_H_
+#define ANDROID_OS_DUMPSTATE_UTIL_H_
#include <cstdint>
#include <string>
-// TODO: use android::os::dumpstate (must wait until device code is refactored)
+namespace android {
+namespace os {
+namespace dumpstate {
/*
* Defines the Linux account that should be executing a command.
@@ -120,9 +122,6 @@
// Common options.
static CommandOptions DEFAULT;
static CommandOptions AS_ROOT;
-
- // TODO: temporary, until device implementations use AS_ROOT
- static CommandOptions AS_ROOT_5;
};
/*
@@ -180,4 +179,8 @@
*/
int GetPidByName(const std::string& ps_name);
-#endif // FRAMEWORK_NATIVE_CMD_DUMPSTATE_UTIL_H_
+} // namespace dumpstate
+} // namespace os
+} // namespace android
+
+#endif // ANDROID_OS_DUMPSTATE_UTIL_H_