Support per-process Application class in <process> tag

Bug: 197264681
Test: atest CtsProcessTest
Change-Id: I08889ed16fadb956715499dc7cee567d10988e61
This commit is contained in:
Makoto Onuki
2021-12-10 09:40:54 -08:00
parent c74e2e0ee7
commit 808fd192fa
2 changed files with 14 additions and 0 deletions

View File

@@ -2584,6 +2584,9 @@
<declare-styleable name="AndroidManifestProcess" parent="AndroidManifestProcesses">
<!-- Required name of the process that is allowed -->
<attr name="process" />
<!-- custom Application class name. We use call it "name", not "className", to be
consistent with the Application tag. -->
<attr name="name" />
<attr name="gwpAsanMode" />
<attr name="memtagMode" />
<attr name="nativeHeapZeroInitialized" />

View File

@@ -588,10 +588,21 @@ static bool RenameManifestPackage(const StringPiece& package_override, xml::Elem
child_el->name == "provider" || child_el->name == "receiver" ||
child_el->name == "service") {
FullyQualifyClassName(original_package, xml::kSchemaAndroid, "name", child_el);
continue;
}
if (child_el->name == "activity-alias") {
FullyQualifyClassName(original_package, xml::kSchemaAndroid, "targetActivity", child_el);
continue;
}
if (child_el->name == "processes") {
for (xml::Element* grand_child_el : child_el->GetChildElements()) {
if (grand_child_el->name == "process") {
FullyQualifyClassName(original_package, xml::kSchemaAndroid, "name", grand_child_el);
}
}
continue;
}
}
}