blob: 21b019eacdcc7dbf943e14bc3604f31794792e88 [file] [log] [blame]
Yifei Zhangcedd4522023-10-31 11:21:32 -07001-include proguard_kotlin.flags
Dave Mankoff99416592022-11-10 22:57:43 +00002-keep class com.android.systemui.VendorServices
3
Dave Mankoff99416592022-11-10 22:57:43 +00004# Needed to ensure callback field references are kept in their respective
5# owning classes when the downstream callback registrars only store weak refs.
Jared Duke8e741232023-09-19 22:51:05 +00006# Note that we restrict this to SysUISingleton classes, as other registering
7# classes should either *always* unregister or *never* register from their
8# constructor. We also keep callback class names for easier debugging.
9-keepnames @com.android.systemui.util.annotations.WeaklyReferencedCallback class *
10-keepnames class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback **
11-if @com.android.systemui.util.annotations.WeaklyReferencedCallback class *
12-keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * {
Dave Mankoff99416592022-11-10 22:57:43 +000013 <1> *;
14}
Jared Duke8e741232023-09-19 22:51:05 +000015-if class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback **
16-keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * {
Dave Mankoff99416592022-11-10 22:57:43 +000017 <1> *;
18}
19
20-keepclasseswithmembers class * {
21 public <init>(android.content.Context, android.util.AttributeSet);
22}
23
Dave Mankoff99416592022-11-10 22:57:43 +000024-keep class androidx.core.app.CoreComponentFactory
25
26# Keep the wm shell lib
27-keep class com.android.wm.shell.*
28# Keep the protolog group methods that are called by the generated code
29-keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup {
30 *;
31}
32
33# Prevent optimization or access modification of any referenced code that may
34# conflict with code in the bootclasspath.
35# TODO(b/222468116): Resolve such collisions in the build system.
36-keepnames class android.**.nano.** { *; }
37-keepnames class com.android.**.nano.** { *; }
38-keepnames class com.android.internal.protolog.** { *; }
39-keepnames class android.hardware.common.** { *; }
40
41# Allows proguard to make private and protected methods and fields public as
42# part of optimization. This lets proguard inline trivial getter/setter methods.
43-allowaccessmodification
44
Dave Mankoff99416592022-11-10 22:57:43 +000045# Strip verbose logs.
46-assumenosideeffects class android.util.Log {
47 static *** v(...);
48 static *** isLoggable(...);
49}
50-assumenosideeffects class android.util.Slog {
51 static *** v(...);
52}
53-maximumremovedandroidloglevel 2