recovery: Allow comma separated codename assertions

* Using `|` is functional, but then breaks older recoveries.
  No point in disallowing commas.

Change-Id: I0f380f5c6207b1a09431b8d40a2a529d9de3233f
This commit is contained in:
Erfan Abdi 2022-03-15 21:34:22 -04:00 committed by zlewchan
parent d1d96d7d72
commit d735cd0f68

View file

@ -221,7 +221,7 @@ bool CheckPackageMetadata(const std::map<std::string, std::string>& metadata, Ot
auto device = android::base::GetProperty("ro.product.device", "");
auto pkg_device = get_value(metadata, "pre-device");
// device name can be a | separated list, so need to check
if (pkg_device.empty() || !isInStringList(device, pkg_device, FINGERPRING_SEPARATOR ":")) {
if (pkg_device.empty() || !isInStringList(device, pkg_device, FINGERPRING_SEPARATOR ":" ",")) {
LOG(ERROR) << "Package is for product " << pkg_device << " but expected " << device;
return false;
}