Handle virtual A/B defines during dynamic_partitions_info merge.
While merging the Dynamic Partition info Dicts in the case of
split builds, pick the virtual-a/b flags like virtual_ab,
virtual_ab_retrofit from the vendor half.
Bug: 146811936
Test: Merged build contains the virtual a/b defines.
Change-Id: I0171b074094e47cfd12dc6af2565acdcd1b65163
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 556d25a..b0a0e02 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -823,6 +823,12 @@
merged_dict[key] = (
"%s %s" %
(framework_dict.get(key, ""), vendor_dict.get(key, ""))).strip()
+
+ # Pick virtual ab related flags from vendor dict, if defined.
+ if "virtual_ab" in vendor_dict.keys():
+ merged_dict["virtual_ab"] = vendor_dict["virtual_ab"]
+ if "virtual_ab_retrofit" in vendor_dict.keys():
+ merged_dict["virtual_ab_retrofit"] = vendor_dict["virtual_ab_retrofit"]
return merged_dict