differenciate between one action and one vision android-9.0-stricted
authorJan Altensen <info@stricted.net>
Mon, 10 Aug 2020 22:34:51 +0000 (00:34 +0200)
committerJan Altensen <info@stricted.net>
Mon, 10 Aug 2020 22:34:51 +0000 (00:34 +0200)
Change-Id: I55b16a8efa4e5dd338defee8815fe33cc2d56305

init/init_troika.cpp

index 6cbeaf23d13350e6d43be1944d4e3f421d28377d..242a21595befbfea17929822118ff6cc9a7c07ea 100644 (file)
@@ -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