Add command line parser for simulator
Add a command line parser. Also add the support to parse the oem
property file and skip certain functions.
Bug: 131911365
Test: run simulator for wear builds
Change-Id: Ide306b53d3f42b29c02279969aeb18bec4045d6f
diff --git a/updater/simulator_runtime.cpp b/updater/simulator_runtime.cpp
index c8718c7..d2074d6 100644
--- a/updater/simulator_runtime.cpp
+++ b/updater/simulator_runtime.cpp
@@ -87,7 +87,11 @@
}
bool SimulatorRuntime::ReadFileToString(const std::string_view filename,
- std::string* /* content */) const {
+ std::string* content) const {
+ if (android::base::EndsWith(filename, "oem.prop")) {
+ return android::base::ReadFileToString(source_->GetOemSettings(), content);
+ }
+
LOG(INFO) << "SKip reading filename " << filename;
return true;
}