-include proguard_kotlin.flags # VendorServices implements CoreStartable and may be instantiated reflectively in # SystemUIApplication#startAdditionalStartable. # TODO(b/373579455): Rewrite this to a @UsesReflection keep annotation. -keep class com.android.systemui.VendorServices { public void (); } # Needed to ensure callback field references are kept in their respective # owning classes when the downstream callback registrars only store weak refs. # Note that we restrict this to SysUISingleton classes, as other registering # classes should either *always* unregister or *never* register from their # constructor. We also keep callback class names for easier debugging. # TODO(b/373579455): Evaluate if needs to be kept. -keepnames @com.android.systemui.util.annotations.WeaklyReferencedCallback class * { void (); } # TODO(b/373579455): Evaluate if needs to be kept. -keepnames class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback ** { void (); } -if @com.android.systemui.util.annotations.WeaklyReferencedCallback class * -keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * { <1> *; } -if class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback ** -keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * { <1> *; } # TODO(b/373579455): Evaluate if needs to be kept. -keep class androidx.core.app.CoreComponentFactory { void (); } # Keep the wm shell lib # TODO(b/373579455): Evaluate if needs to be kept. -keep class com.android.wm.shell.* { void (); } # Keep the protolog group methods that are called by the generated code -keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup { *; } # Prevent optimization or access modification of any referenced code that may # conflict with code in the bootclasspath. # TODO(b/222468116): Resolve such collisions in the build system. -keepnames class android.**.nano.** { *; } -keepnames class com.android.**.nano.** { *; } -keepnames class com.android.internal.protolog.** { *; } -keepnames class android.hardware.common.** { *; } # TODO(b/316553881): Statically linking flags into SystemUI and bootclasspath might not be a # good idea in the first place -keepnames class com.android.window.flags.Flags { public *; } # Allows proguard to make private and protected methods and fields public as # part of optimization. This lets proguard inline trivial getter/setter methods. -allowaccessmodification # Strip verbose logs. -assumenosideeffects class android.util.Log { static *** v(...); static *** isLoggable(...); } -assumenosideeffects class android.util.Slog { static *** v(...); } -maximumremovedandroidloglevel 2 #Keep the R -keepclassmembers class com.android.systemui.customization.R$* { public static ; }