From bbdae921ffd5c73e3c91d4557aeb2320617c5fce Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Tue, 11 Aug 2020 00:34:51 +0200 Subject: [PATCH] differenciate between one action and one vision Change-Id: I55b16a8efa4e5dd338defee8815fe33cc2d56305 --- init/init_troika.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/init/init_troika.cpp b/init/init_troika.cpp index 6cbeaf2..242a215 100644 --- a/init/init_troika.cpp +++ b/init/init_troika.cpp @@ -40,27 +40,25 @@ namespace android { namespace init { void vendor_load_properties() { -// std::string boot_device = android::base::GetProperty("ro.boot.device", ""); + std::string boot_device = android::base::GetProperty("ro.boot.device", ""); -// switch (boot_device) { -// case troika: + if (!boot_device.compare("troika")) { /* Moto One Action */ property_set("ro.product.model", "Motorola_One_Action"); property_set("ro.build.product", "one_action"); property_set("ro.product.device", "one_action"); property_set("ro.vendor.product.device", "one_action"); -// break; -// case kane: -// /* Moto One Vision */ -// property_set("ro.product.model", "Motorola_One_Vision"); -// property_set("ro.build.product", "one_vision"); -// property_set("ro.product.device", "one_vision"); -// property_set("ro.vendor.product.device", "one_vision"); -// break; -// default: -// LOG(ERROR) << __func__ << ": unexcepted boot device!"; + } else if (!boot_device.compare("kane")) { + /* Moto One Vision */ + property_set("ro.product.model", "Motorola_One_Vision"); + property_set("ro.build.product", "one_vision"); + property_set("ro.product.device", "one_vision"); + property_set("ro.vendor.product.device", "one_vision"); + } else { + LOG(ERROR) << __func__ << ": unexcepted boot device!"; } + } } // namespace init -//} // namespace android \ No newline at end of file +} // namespace android -- 2.20.1