Parse <overlay> and abstract resource mapping

This change introduces idmap parsing of <overlay> tags.

The <overlay> tag allows one to explicitly map resources in the target
to either a resource in the overlay or an inline attribute value.

Use the android:resourcesMap atttribute on the <overlay> tag in the
android manifest to specify a file to provide the resource mapping.

Bug: 135943783
Bug: 135051420
Test: idmap2_tests
Change-Id: I1740dcdc01849c43b1f2cb8c6645d666dbb05dba
diff --git a/cmds/idmap2/Android.bp b/cmds/idmap2/Android.bp
index 60d6414..41a1706 100644
--- a/cmds/idmap2/Android.bp
+++ b/cmds/idmap2/Android.bp
@@ -43,6 +43,7 @@
         "libidmap2/Policies.cpp",
         "libidmap2/PrettyPrintVisitor.cpp",
         "libidmap2/RawPrintVisitor.cpp",
+        "libidmap2/ResourceMapping.cpp",
         "libidmap2/ResourceUtils.cpp",
         "libidmap2/Result.cpp",
         "libidmap2/XmlParser.cpp",
@@ -97,6 +98,7 @@
         "tests/PoliciesTests.cpp",
         "tests/PrettyPrintVisitorTests.cpp",
         "tests/RawPrintVisitorTests.cpp",
+        "tests/ResourceMappingTests.cpp",
         "tests/ResourceUtilsTests.cpp",
         "tests/ResultTests.cpp",
         "tests/XmlParserTests.cpp",