blob: f96644fbd6673a550365b229d2d8b63bbc25aaee [file] [log] [blame]
Jared Duke629526d2022-02-08 11:28:34 -08001# Preserve line number information for debugging stack traces.
2-keepattributes SourceFile,LineNumberTable
3
Yohei Yukawa25c61e42022-02-14 22:30:49 +00004-keep class com.android.systemui.recents.OverviewProxyRecentsImpl
5-keep class com.android.systemui.statusbar.car.CarStatusBar
Dave Mankoff4a38c282022-04-22 15:28:57 +00006-keep class com.android.systemui.statusbar.phone.CentralSurfaces
Yohei Yukawa25c61e42022-02-14 22:30:49 +00007-keep class com.android.systemui.statusbar.tv.TvStatusBar
Dave Mankoffa267ea02022-07-08 18:20:20 +00008-keep class ** extends com.android.systemui.SystemUIInitializer {
9 *;
10}
Yohei Yukawa25c61e42022-02-14 22:30:49 +000011-keep class * extends com.android.systemui.CoreStartable
12-keep class * implements com.android.systemui.CoreStartable$Injector
Winsone6c90732015-09-24 16:06:29 -070013
Fabian Kozynski31ea98c02022-08-01 12:35:31 -040014# Needed for builds to properly initialize KeyFrames from xml scene
15-keepclassmembers class * extends androidx.constraintlayout.motion.widget.Key {
16 public <init>();
17}
18
Jason Monk87ccd552015-12-11 21:39:54 -050019-keepclasseswithmembers class * {
20 public <init>(android.content.Context, android.util.AttributeSet);
21}
22
Aurimas Liutikasfd52c142018-04-17 09:50:46 -070023-keep class ** extends androidx.preference.PreferenceFragment
Yohei Yukawa25c61e42022-02-14 22:30:49 +000024-keep class com.android.systemui.tuner.*
Kevin Jeon4c394532022-11-15 19:00:12 +000025
Jared Duke548aa372022-11-30 13:38:17 -080026# The plugins subpackage acts as a shared library that might be referenced in
Kevin Jeon4c394532022-11-15 19:00:12 +000027# dynamically-loaded plugin APKs.
Jason Monk86bc3312016-08-16 13:17:56 -040028-keep class com.android.systemui.plugins.** {
Jason Monke6089af2018-07-31 14:38:11 -040029 *;
Jason Monk86bc3312016-08-16 13:17:56 -040030}
Jason Monk9424af72018-12-19 14:17:26 -050031-keep class com.android.systemui.fragments.FragmentService$FragmentCreator {
32 *;
33}
Aurimas Liutikasfd52c142018-04-17 09:50:46 -070034-keep class androidx.core.app.CoreComponentFactory
Dave Mankoffa5d8a392019-10-10 12:21:09 -040035
Yohei Yukawa25c61e42022-02-14 22:30:49 +000036-keep public class * extends com.android.systemui.CoreStartable {
37 public <init>(android.content.Context);
38}
39
Winson Chungb754f522020-08-03 22:17:08 -070040# Keep the wm shell lib
Dave Mankoff85528072020-08-06 10:32:25 -040041-keep class com.android.wm.shell.*
Winson Chungb754f522020-08-03 22:17:08 -070042# Keep the protolog group methods that are called by the generated code
43-keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup {
44 *;
45}
Dave Mankoff85528072020-08-06 10:32:25 -040046
Yohei Yukawa25c61e42022-02-14 22:30:49 +000047-keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.GlobalRootComponent { !synthetic *; }
48-keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.GlobalRootComponent$SysUIComponentImpl { !synthetic *; }
49-keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.Dagger** { !synthetic *; }
50-keep,allowoptimization,allowaccessmodification class com.android.systemui.tv.Dagger** { !synthetic *; }
51
Jared Duke83a28e62022-03-03 13:11:46 -080052# Prevent optimization or access modification of any referenced code that may
53# conflict with code in the bootclasspath.
54# TODO(b/222468116): Resolve such collisions in the build system.
55-keepnames class android.**.nano.** { *; }
56-keepnames class com.android.**.nano.** { *; }
57-keepnames class com.android.internal.protolog.** { *; }
58-keepnames class android.hardware.common.** { *; }
59
Jared Duke2fee7402021-10-18 14:35:04 -070060# Allows proguard to make private and protected methods and fields public as
61# part of optimization. This lets proguard inline trivial getter/setter methods.
62-allowaccessmodification
Jared Dukedc1646f2021-11-30 12:35:45 -080063
64# Removes runtime checks added through Kotlin to JVM code genereration to
65# avoid linear growth as more Kotlin code is converted / added to the codebase.
66# These checks are generally applied to Java platform types (values returned
67# from Java code that don't have nullness annotations), but we remove them to
68# avoid code size increases.
69#
70# See also https://kotlinlang.org/docs/reference/java-interop.html
71#
72# TODO(b/199941987): Consider standardizing these rules in a central place as
73# Kotlin gains adoption with other platform targets.
74-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
75 # Remove check for method parameters being null
76 static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
77
78 # When a Java platform type is returned and passed to Kotlin NonNull method,
79 # remove the null check
80 static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
81 static void checkNotNullExpressionValue(java.lang.Object, java.lang.String);
82
83 # Remove check that final value returned from method is null, if passing
84 # back Java platform type.
85 static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
86 static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String);
87
88 # Null check for accessing a field from a parent class written in Java.
89 static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
90 static void checkFieldIsNotNull(java.lang.Object, java.lang.String);
91
92 # Removes code generated from !! operator which converts Nullable type to
93 # NonNull type. These would throw an NPE immediate after on access.
94 static void checkNotNull(java.lang.Object, java.lang.String);
95 static void checkNotNullParameter(java.lang.Object, java.lang.String);
96
97 # Removes lateinit var check being used before being set. Check is applied
98 # on every field access without this.
99 static void throwUninitializedPropertyAccessException(java.lang.String);
100}