diff options
author | Jake Wharton <jakew@google.com> | 2018-06-12 09:39:14 -0400 |
---|---|---|
committer | Jake Wharton <jakew@google.com> | 2018-07-18 12:09:17 -0400 |
commit | e4bd16028442e36b13fe6fc119393eae5840508d (patch) | |
tree | 342a6e793238f7ea45e302192668169f71f03d29 /tools/aapt2/java/ProguardRules_test.cpp | |
parent | cfbc767b61f5a0afab2bf1b993151d57a743ce31 (diff) |
Add rule emissions for appComponentFactory
This attribute was added in API 28 and is reflectively instantiated from a zero-argument constructor.
Test: make aapt2_tests
Change-Id: Ie9de0764165c6fe6c6fcda6cc38b0cc633f03bbd
Diffstat (limited to 'tools/aapt2/java/ProguardRules_test.cpp')
-rw-r--r-- | tools/aapt2/java/ProguardRules_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/aapt2/java/ProguardRules_test.cpp b/tools/aapt2/java/ProguardRules_test.cpp index 6e0df50bd9c4..aeb9eb6e91c4 100644 --- a/tools/aapt2/java/ProguardRules_test.cpp +++ b/tools/aapt2/java/ProguardRules_test.cpp @@ -38,6 +38,7 @@ TEST(ProguardRulesTest, ManifestRuleDefaultConstructorOnly) { std::unique_ptr<xml::XmlResource> manifest = test::BuildXmlDom(R"( <manifest xmlns:android="http://schemas.android.com/apk/res/android"> <application + android:appComponentFactory="com.foo.BarAppComponentFactory" android:backupAgent="com.foo.BarBackupAgent" android:name="com.foo.BarApplication" > @@ -54,6 +55,7 @@ TEST(ProguardRulesTest, ManifestRuleDefaultConstructorOnly) { std::string actual = GetKeepSetString(set); + EXPECT_THAT(actual, HasSubstr("-keep class com.foo.BarAppComponentFactory { <init>(); }")); EXPECT_THAT(actual, HasSubstr("-keep class com.foo.BarBackupAgent { <init>(); }")); EXPECT_THAT(actual, HasSubstr("-keep class com.foo.BarApplication { <init>(); }")); EXPECT_THAT(actual, HasSubstr("-keep class com.foo.BarActivity { <init>(); }")); |