Accept --overlay-name flag in idmap2
To support allowing for multiple <overlay> tags in one package, idmap2
must be able to generate an idmap for an individual <overlay> tag.
`idmap2 create` now accepts a --overlay-name flag that specifies which
tag to use to generate the idmap. The value of --overlay-name should be
set to the value of the android:name attribute on the <overlay> tag to
use.
If the flag is not present, idmap2 will look for an <overlay> tag with
no value for android:name.
Bug: 162841629
Test: libandroidfw_tests
Test: libidmap2_tests
Change-Id: I02316d0b88773f02c04a5d462be9825016fa496d
diff --git a/cmds/idmap2/tests/TestConstants.h b/cmds/idmap2/tests/TestConstants.h
index 69575b8..d5799ad 100644
--- a/cmds/idmap2/tests/TestConstants.h
+++ b/cmds/idmap2/tests/TestConstants.h
@@ -22,8 +22,11 @@
constexpr const auto TARGET_CRC = 0x7c2d4719;
constexpr const auto TARGET_CRC_STRING = "7c2d4719";
-constexpr const auto OVERLAY_CRC = 0x5afff726;
-constexpr const auto OVERLAY_CRC_STRING = "5afff726";
+constexpr const auto OVERLAY_CRC = 0xb71095cf;
+constexpr const auto OVERLAY_CRC_STRING = "b71095cf";
+
+constexpr const char* OVERLAY_NAME_DEFAULT = "Default";
+constexpr const char* OVERLAY_NAME_ALL_POLICIES = "AllPolicies";
} // namespace android::idmap2::TestConstants