Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 367ecdd5 authored by Akhil Gangu's avatar Akhil Gangu
Browse files

Allow purpose and valid-purpose child tags in the manifest.

This change is required to avoid AAPT2 from failing when <purpose> and
<valid-purpose> child tags are used in the manifest.

Bug: 419560908
Test: used tags in platform manifest and ran m -j99
Flag: android.permission.flags.purpose_declaration_enabled
Change-Id: Iaf6f67159b2194d1dbdebb9c1d2dd90b75efb8f9
parent 3a95dbac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -619,10 +619,13 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, IAaptContext* c
  manifest_action["protected-broadcast"];
  manifest_action["adopt-permissions"];
  manifest_action["uses-permission"];
  manifest_action["uses-permission"]["purpose"];
  manifest_action["uses-permission"]["required-feature"].Action(RequiredNameIsNotEmpty);
  manifest_action["uses-permission"]["required-not-feature"].Action(RequiredNameIsNotEmpty);
  manifest_action["uses-permission-sdk-23"];
  manifest_action["uses-permission-sdk-23"]["purpose"];
  manifest_action["permission"];
  manifest_action["permission"]["valid-purpose"].Action(RequiredNameIsNotEmpty);
  manifest_action["permission"]["meta-data"] = meta_data_action;
  manifest_action["permission-tree"];
  manifest_action["permission-group"];