Allow arbitrary channels in Android.
Add a new image property allow_arbitrary_channels which is true on
Android and false on Chrome OS.
Bug: 72259103
Test: adb shell update_engine_client --channel=foo-channel
Change-Id: I70a0980fd877ee32d6152595f8d4462bf43254a2
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 3ba7037..641032b 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -192,7 +192,7 @@
}
bool OmahaRequestParams::IsValidChannel(const string& channel) const {
- return GetChannelIndex(channel) >= 0;
+ return image_props_.allow_arbitrary_channels || GetChannelIndex(channel) >= 0;
}
void OmahaRequestParams::set_root(const string& root) {