Report build_type to Omaha.
Send additional os_build_type <app> attribute to distinguish between
user and userdebug images.
Bug: 36491462
Test: check omaha request xml
Change-Id: I519e85293db9a2194e0cd015a3a944adc723c3dd
(cherry picked from commit eba2297072914582aed5008ad5f99374124ae4d7)
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index 0026ad5..473f138 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -270,12 +270,19 @@
"fingerprint=\"" + XmlEncodeWithDefault(params->os_build_fingerprint(), "") + "\" ";
}
+ string buildtype_arg;
+ if (!params->os_build_type().empty()) {
+ buildtype_arg = "os_build_type=\"" +
+ XmlEncodeWithDefault(params->os_build_type(), "") + "\" ";
+ }
+
string app_xml = " <app "
"appid=\"" + XmlEncodeWithDefault(app_data.id, "") + "\" " +
app_cohort_args +
app_versions +
app_channels +
fingerprint_arg +
+ buildtype_arg +
"lang=\"" + XmlEncodeWithDefault(params->app_lang(), "en-US") + "\" " +
"board=\"" + XmlEncodeWithDefault(params->os_board(), "") + "\" " +
"hardware_class=\"" + XmlEncodeWithDefault(params->hwid(), "") + "\" " +