summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/ProguardRules.cpp
diff options
context:
space:
mode:
authorJake Wharton <jakew@google.com>2018-06-08 17:56:55 -0400
committerJake Wharton <jakew@google.com>2018-06-11 11:33:17 -0400
commitab660a7fde368f30d88af7e4c864b5489dcd44f3 (patch)
tree93863c209d635eca6bb60e97487094e474669e7e /tools/aapt2/java/ProguardRules.cpp
parentaa035cf77bad6db95221680654f0cf32c95fd3b9 (diff)
Only keep default constructor of manifest items
Reflection-based instantiation of manifest-declared types is only done on the default (aka no-argument) constructor. While these types are unlikely to have alternate constructors (unlike the others listed in the bug), there's no reason to generate overly keep-y rules for them. Bug: 37123156 Test: make aapt2_tests Change-Id: Ic83a2671a54ea5dd558bfcacf033a60e9568ab8c
Diffstat (limited to 'tools/aapt2/java/ProguardRules.cpp')
-rw-r--r--tools/aapt2/java/ProguardRules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt2/java/ProguardRules.cpp b/tools/aapt2/java/ProguardRules.cpp
index 2857d5a2d90e..d7ebd8c1d33e 100644
--- a/tools/aapt2/java/ProguardRules.cpp
+++ b/tools/aapt2/java/ProguardRules.cpp
@@ -365,7 +365,7 @@ void WriteKeepSet(const KeepSet& keep_set, OutputStream* out) {
for (const UsageLocation& location : entry.second) {
printer.Print("# Referenced at ").Println(location.source.to_string());
}
- printer.Print("-keep class ").Print(entry.first).Println(" { <init>(...); }");
+ printer.Print("-keep class ").Print(entry.first).Println(" { <init>(); }");
}
for (const auto& entry : keep_set.conditional_class_set_) {