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
This commit is contained in:
Tianjie Xu
2019-07-15 16:13:49 -07:00
parent fc2ad88770
commit 7efd23338a
3 changed files with 97 additions and 10 deletions
+5 -1
View File
@@ -87,7 +87,11 @@ int SimulatorRuntime::WipeBlockDevice(const std::string_view filename, size_t /*
}
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;
}