From 335b565eb646b6568709059b5c9817eb634c0cc9 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Thu, 4 Apr 2019 12:46:47 -0700 Subject: [PATCH] Support profileable application action Fixes: 129358330 Test: make -j16 aapt2_run_host_unit_tests && cat out/target/product/walleye/obj/PACKAGING/aapt2_run_host_unit_tests_intermediates/result.xml | grep "failure message" Change-Id: Id9ec59447a99a5f6e0bfe47c0b8ce3553bf751c7 --- tools/aapt2/link/ManifestFixer.cpp | 1 + tools/aapt2/link/ManifestFixer_test.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp index b0a2055cafc86..49909f6e2b8e1 100644 --- a/tools/aapt2/link/ManifestFixer.cpp +++ b/tools/aapt2/link/ManifestFixer.cpp @@ -367,6 +367,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, application_action["uses-library"].Action(RequiredNameIsNotEmpty); application_action["library"].Action(RequiredNameIsNotEmpty); + application_action["profileable"]; xml::XmlNodeAction& static_library_action = application_action["static-library"]; static_library_action.Action(RequiredNameIsJavaPackage); diff --git a/tools/aapt2/link/ManifestFixer_test.cpp b/tools/aapt2/link/ManifestFixer_test.cpp index 4842f62e53b58..3f1ee36dea4a0 100644 --- a/tools/aapt2/link/ManifestFixer_test.cpp +++ b/tools/aapt2/link/ManifestFixer_test.cpp @@ -671,6 +671,24 @@ TEST_F(ManifestFixerTest, ApplicationInjectDebuggable) { {}, "application", xml::kSchemaAndroid, "debuggable", "true"), NotNull()); } +TEST_F(ManifestFixerTest, ApplicationProfileable) { + std::string shell = R"( + + + + + )"; + EXPECT_THAT(Verify(shell), NotNull()); + std::string noshell = R"( + + + + + )"; + EXPECT_THAT(Verify(noshell), NotNull()); +} TEST_F(ManifestFixerTest, IgnoreNamespacedElements) { std::string input = R"EOF(