Add a keep rule for SystemUIAnimationLib
This change adds a keep rule for SystemUIAnimationLib so that animation
code can be used by SystemUIClocks at runtime.
com.android.systemui.animation.R$ classes are filtered out to avoid
including transitive resource dependencies.
On panther, this results in these SystemUIGoogle apk/odex size changes:
- SystemUIGoogle.apk: 37628192->37670640 (+41.45KB, +0.11%)
- SystemUIGoogle.odex: 34143312->34197712 (+43.13KB, +0.16%)
- SystemUIClocks.apk: 3867456->1675787 (-2.09MB, -56.67%)
- SystemUIClocks.odex: 29616->21424 (-8 KB, -27.66%)
Test: Build and flash; presubmit.
Bug: 215530220
Change-Id: Ic863d9c788f51132766136a0534d702910f541b8
diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags
index 7538555..1282d77 100644
--- a/packages/SystemUI/proguard.flags
+++ b/packages/SystemUI/proguard.flags
@@ -22,9 +22,15 @@
-keep class ** extends androidx.preference.PreferenceFragment
-keep class com.android.systemui.tuner.*
+
+# The plugins and animation subpackages both act as shared libraries that might be referenced in
+# dynamically-loaded plugin APKs.
-keep class com.android.systemui.plugins.** {
*;
}
+-keep class !com.android.systemui.animation.R$**,com.android.systemui.animation.** {
+ *;
+}
-keep class com.android.systemui.fragments.FragmentService$FragmentCreator {
*;
}