AAPT2: Add the rest of supported manifest elements
Adds elemnts that are parsed in PackageParser to the manifest parsing of
AAPT2.
<package> found in <manifest>
<preferred> found in <manifest><application><activity>
Bug: 79755007
Test: manual building of broken targets listed in the bug
Change-Id: Ic7d17e62d04aa46757d2ed7482ec0aff93ce9ee5
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index c5c78d9..fa6538d 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -252,6 +252,7 @@
xml::XmlNodeAction component_action;
component_action.Action(RequiredNameIsJavaClassName);
component_action["intent-filter"] = intent_filter_action;
+ component_action["preferred"] = intent_filter_action;
component_action["meta-data"] = meta_data_action;
// Manifest actions.
@@ -414,6 +415,8 @@
application_action["provider"]["grant-uri-permission"];
application_action["provider"]["path-permission"];
+ manifest_action["package"] = manifest_action;
+
return true;
}