Explicitly keep default constructor in rules without members
R8 implicitly keeps the default constructor when no member rules are specified. Future versions of R8 will require apps to explicitly keep the default constructors that are required for the build to work.
This conservatively changes all keep rules that currently keep the default constructor to explicitly keep the default constructor.
Future work will attempt to tighten up the rules that do not require the default constructor to be kept.
Bug: 373579455
Test: existing
Change-Id: If0d521f6a8cbca154ffab32e2c437cf3c614ad3d
diff --git a/proguard.flags b/proguard.flags
index 7c71a15..9d326ff 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -1,7 +1,9 @@
--verbose
--keep @com.android.internal.annotations.VisibleForTesting class *
+# TODO(b/373579455): Evaluate if <init> needs to be kept.
+-keep @com.android.internal.annotations.VisibleForTesting class * {
+ void <init>();
+}
-keep public class * extends android.widget.ListView {
- public *;
+ public *;
}
-keep class com.android.server.telecom.TelecomSystem {
*;