Jared Duke | 629526d | 2022-02-08 11:28:34 -0800 | [diff] [blame] | 1 | # Preserve line number information for debugging stack traces. |
| 2 | -keepattributes SourceFile,LineNumberTable |
| 3 | |
Yohei Yukawa | 25c61e4 | 2022-02-14 22:30:49 +0000 | [diff] [blame] | 4 | -keep class com.android.systemui.recents.OverviewProxyRecentsImpl |
| 5 | -keep class com.android.systemui.statusbar.car.CarStatusBar |
Dave Mankoff | 4a38c28 | 2022-04-22 15:28:57 +0000 | [diff] [blame] | 6 | -keep class com.android.systemui.statusbar.phone.CentralSurfaces |
Yohei Yukawa | 25c61e4 | 2022-02-14 22:30:49 +0000 | [diff] [blame] | 7 | -keep class com.android.systemui.statusbar.tv.TvStatusBar |
Dave Mankoff | a267ea0 | 2022-07-08 18:20:20 +0000 | [diff] [blame] | 8 | -keep class ** extends com.android.systemui.SystemUIInitializer { |
| 9 | *; |
| 10 | } |
Yohei Yukawa | 25c61e4 | 2022-02-14 22:30:49 +0000 | [diff] [blame] | 11 | -keep class * extends com.android.systemui.CoreStartable |
| 12 | -keep class * implements com.android.systemui.CoreStartable$Injector |
Winson | e6c9073 | 2015-09-24 16:06:29 -0700 | [diff] [blame] | 13 | |
Fabian Kozynski | 31ea98c0 | 2022-08-01 12:35:31 -0400 | [diff] [blame] | 14 | # 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 Monk | 87ccd55 | 2015-12-11 21:39:54 -0500 | [diff] [blame] | 19 | -keepclasseswithmembers class * { |
| 20 | public <init>(android.content.Context, android.util.AttributeSet); |
| 21 | } |
| 22 | |
Aurimas Liutikas | fd52c14 | 2018-04-17 09:50:46 -0700 | [diff] [blame] | 23 | -keep class ** extends androidx.preference.PreferenceFragment |
Yohei Yukawa | 25c61e4 | 2022-02-14 22:30:49 +0000 | [diff] [blame] | 24 | -keep class com.android.systemui.tuner.* |
Kevin Jeon | 4c39453 | 2022-11-15 19:00:12 +0000 | [diff] [blame^] | 25 | |
| 26 | # The plugins and animation subpackages both act as shared libraries that might be referenced in |
| 27 | # dynamically-loaded plugin APKs. |
Jason Monk | 86bc331 | 2016-08-16 13:17:56 -0400 | [diff] [blame] | 28 | -keep class com.android.systemui.plugins.** { |
Jason Monk | e6089af | 2018-07-31 14:38:11 -0400 | [diff] [blame] | 29 | *; |
Jason Monk | 86bc331 | 2016-08-16 13:17:56 -0400 | [diff] [blame] | 30 | } |
Kevin Jeon | 4c39453 | 2022-11-15 19:00:12 +0000 | [diff] [blame^] | 31 | -keep class !com.android.systemui.animation.R$**,com.android.systemui.animation.** { |
| 32 | *; |
| 33 | } |
Jason Monk | 9424af7 | 2018-12-19 14:17:26 -0500 | [diff] [blame] | 34 | -keep class com.android.systemui.fragments.FragmentService$FragmentCreator { |
| 35 | *; |
| 36 | } |
Aurimas Liutikas | fd52c14 | 2018-04-17 09:50:46 -0700 | [diff] [blame] | 37 | -keep class androidx.core.app.CoreComponentFactory |
Dave Mankoff | a5d8a39 | 2019-10-10 12:21:09 -0400 | [diff] [blame] | 38 | |
Yohei Yukawa | 25c61e4 | 2022-02-14 22:30:49 +0000 | [diff] [blame] | 39 | -keep public class * extends com.android.systemui.CoreStartable { |
| 40 | public <init>(android.content.Context); |
| 41 | } |
| 42 | |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 43 | # Keep the wm shell lib |
Dave Mankoff | 8552807 | 2020-08-06 10:32:25 -0400 | [diff] [blame] | 44 | -keep class com.android.wm.shell.* |
Winson Chung | b754f52 | 2020-08-03 22:17:08 -0700 | [diff] [blame] | 45 | # Keep the protolog group methods that are called by the generated code |
| 46 | -keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup { |
| 47 | *; |
| 48 | } |
Dave Mankoff | 8552807 | 2020-08-06 10:32:25 -0400 | [diff] [blame] | 49 | |
Yohei Yukawa | 25c61e4 | 2022-02-14 22:30:49 +0000 | [diff] [blame] | 50 | -keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.GlobalRootComponent { !synthetic *; } |
| 51 | -keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.GlobalRootComponent$SysUIComponentImpl { !synthetic *; } |
| 52 | -keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.Dagger** { !synthetic *; } |
| 53 | -keep,allowoptimization,allowaccessmodification class com.android.systemui.tv.Dagger** { !synthetic *; } |
| 54 | |
Jared Duke | 83a28e6 | 2022-03-03 13:11:46 -0800 | [diff] [blame] | 55 | # Prevent optimization or access modification of any referenced code that may |
| 56 | # conflict with code in the bootclasspath. |
| 57 | # TODO(b/222468116): Resolve such collisions in the build system. |
| 58 | -keepnames class android.**.nano.** { *; } |
| 59 | -keepnames class com.android.**.nano.** { *; } |
| 60 | -keepnames class com.android.internal.protolog.** { *; } |
| 61 | -keepnames class android.hardware.common.** { *; } |
| 62 | |
Jared Duke | 2fee740 | 2021-10-18 14:35:04 -0700 | [diff] [blame] | 63 | # Allows proguard to make private and protected methods and fields public as |
| 64 | # part of optimization. This lets proguard inline trivial getter/setter methods. |
| 65 | -allowaccessmodification |
Jared Duke | dc1646f | 2021-11-30 12:35:45 -0800 | [diff] [blame] | 66 | |
| 67 | # Removes runtime checks added through Kotlin to JVM code genereration to |
| 68 | # avoid linear growth as more Kotlin code is converted / added to the codebase. |
| 69 | # These checks are generally applied to Java platform types (values returned |
| 70 | # from Java code that don't have nullness annotations), but we remove them to |
| 71 | # avoid code size increases. |
| 72 | # |
| 73 | # See also https://kotlinlang.org/docs/reference/java-interop.html |
| 74 | # |
| 75 | # TODO(b/199941987): Consider standardizing these rules in a central place as |
| 76 | # Kotlin gains adoption with other platform targets. |
| 77 | -assumenosideeffects class kotlin.jvm.internal.Intrinsics { |
| 78 | # Remove check for method parameters being null |
| 79 | static void checkParameterIsNotNull(java.lang.Object, java.lang.String); |
| 80 | |
| 81 | # When a Java platform type is returned and passed to Kotlin NonNull method, |
| 82 | # remove the null check |
| 83 | static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String); |
| 84 | static void checkNotNullExpressionValue(java.lang.Object, java.lang.String); |
| 85 | |
| 86 | # Remove check that final value returned from method is null, if passing |
| 87 | # back Java platform type. |
| 88 | static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String); |
| 89 | static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String); |
| 90 | |
| 91 | # Null check for accessing a field from a parent class written in Java. |
| 92 | static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String); |
| 93 | static void checkFieldIsNotNull(java.lang.Object, java.lang.String); |
| 94 | |
| 95 | # Removes code generated from !! operator which converts Nullable type to |
| 96 | # NonNull type. These would throw an NPE immediate after on access. |
| 97 | static void checkNotNull(java.lang.Object, java.lang.String); |
| 98 | static void checkNotNullParameter(java.lang.Object, java.lang.String); |
| 99 | |
| 100 | # Removes lateinit var check being used before being set. Check is applied |
| 101 | # on every field access without this. |
| 102 | static void throwUninitializedPropertyAccessException(java.lang.String); |
| 103 | } |