AAPT2: Define intermediate compiled XML proto

This proto format is meant to encapsulate more information
that is specific to Android and allows for easier validation
and manipulation across tools.

Test: make aapt2_tests
Bug: 65645766
Change-Id: I13bc34a460671fc0a36246be0d287a3d37d244d6
Merged-In: I13bc34a460671fc0a36246be0d287a3d37d244d6
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index eb59175..1cba194 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -805,13 +805,12 @@
     return false;
   }
 
-  if (items.size() != other->items.size()) {
+  if (elements.size() != other->elements.size()) {
     return false;
   }
 
-  return std::equal(items.begin(), items.end(), other->items.begin(),
-                    [](const std::unique_ptr<Item>& a,
-                       const std::unique_ptr<Item>& b) -> bool {
+  return std::equal(elements.begin(), elements.end(), other->elements.begin(),
+                    [](const std::unique_ptr<Item>& a, const std::unique_ptr<Item>& b) -> bool {
                       return a->Equals(b.get());
                     });
 }
@@ -820,14 +819,14 @@
   Array* array = new Array();
   array->comment_ = comment_;
   array->source_ = source_;
-  for (auto& item : items) {
-    array->items.emplace_back(std::unique_ptr<Item>(item->Clone(new_pool)));
+  for (auto& item : elements) {
+    array->elements.emplace_back(std::unique_ptr<Item>(item->Clone(new_pool)));
   }
   return array;
 }
 
 void Array::Print(std::ostream* out) const {
-  *out << "(array) [" << util::Joiner(items, ", ") << "]";
+  *out << "(array) [" << util::Joiner(elements, ", ") << "]";
 }
 
 bool Plural::Equals(const Value* value) const {