installcommand: support additional delimiter for 'pre-device' values
Change-Id: I2004f1cf07a1282ae5b3126a979265ce5587ef8b
diff --git a/twrpinstall/installcommand.cpp b/twrpinstall/installcommand.cpp
index 88c90f8..3b587b9 100755
--- a/twrpinstall/installcommand.cpp
+++ b/twrpinstall/installcommand.cpp
@@ -128,7 +128,7 @@
property_get("ro.product.name", propname, "");
const std::string& pkg_device = metadata["pre-device"];
- std::vector<std::string> assertResults = android::base::Split(pkg_device, ",");
+ std::vector<std::string> assertResults = android::base::Split(pkg_device, "[,|]");
bool deviceExists = false;
@@ -136,7 +136,7 @@
bool has_target_devices = false;
char tw_devices[PROPERTY_VALUE_MAX * 2];
property_get("ro.twrp.target.devices", tw_devices, "");
- std::vector<std::string> TWRP_devices = android::base::Split(tw_devices, ",");
+ std::vector<std::string> TWRP_devices = android::base::Split(tw_devices, "[,|]");
if (strlen(tw_devices) > 1) {
has_target_devices = true;
}