From 7efd23338a0d18d596aa1058896e72d1ee3cb501 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Mon, 15 Jul 2019 16:13:49 -0700 Subject: 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 --- updater/simulator_runtime.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'updater/simulator_runtime.cpp') diff --git a/updater/simulator_runtime.cpp b/updater/simulator_runtime.cpp index c8718c71a..d2074d69a 100644 --- a/updater/simulator_runtime.cpp +++ b/updater/simulator_runtime.cpp @@ -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; } -- cgit v1.2.3