# Preserve line number information for debugging stack traces.
-keepattributes SourceFile,LineNumberTable

# Preserve relationship information that can impact simple class naming.
-keepattributes EnclosingMethod,InnerClasses

-keep class com.android.systemui.recents.OverviewProxyRecentsImpl
-keep class com.android.systemui.statusbar.car.CarStatusBar
-keep class com.android.systemui.statusbar.phone.CentralSurfaces
-keep class com.android.systemui.statusbar.tv.TvStatusBar
-keep class ** extends com.android.systemui.SystemUIInitializer {
    *;
}
-keep class * extends com.android.systemui.CoreStartable
-keep class * implements com.android.systemui.CoreStartable$Injector

# Needed for builds to properly initialize KeyFrames from xml scene
-keepclassmembers class * extends androidx.constraintlayout.motion.widget.Key {
  public <init>();
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keep class ** extends androidx.preference.PreferenceFragment
-keep class com.android.systemui.tuner.*
-keep class com.android.systemui.plugins.** {
    *;
}
-keep class com.android.systemui.fragments.FragmentService$FragmentCreator {
    *;
}
-keep class androidx.core.app.CoreComponentFactory

-keep public class * extends com.android.systemui.CoreStartable {
    public <init>(android.content.Context);
}

# Keep the wm shell lib
-keep class com.android.wm.shell.*
# Keep the protolog group methods that are called by the generated code
-keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup {
    *;
}

-keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.GlobalRootComponent { !synthetic *; }
-keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.GlobalRootComponent$SysUIComponentImpl { !synthetic *; }
-keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.Dagger** { !synthetic *; }
-keep,allowoptimization,allowaccessmodification class com.android.systemui.tv.Dagger** { !synthetic *; }

# 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.** { *; }

# Allows proguard to make private and protected methods and fields public as
# part of optimization. This lets proguard inline trivial getter/setter methods.
-allowaccessmodification

# Removes runtime checks added through Kotlin to JVM code genereration to
# avoid linear growth as more Kotlin code is converted / added to the codebase.
# These checks are generally applied to Java platform types (values returned
# from Java code that don't have nullness annotations), but we remove them to
# avoid code size increases.
#
# See also https://kotlinlang.org/docs/reference/java-interop.html
#
# TODO(b/199941987): Consider standardizing these rules in a central place as
# Kotlin gains adoption with other platform targets.
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
    # Remove check for method parameters being null
    static void checkParameterIsNotNull(java.lang.Object, java.lang.String);

    # When a Java platform type is returned and passed to Kotlin NonNull method,
    # remove the null check
    static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
    static void checkNotNullExpressionValue(java.lang.Object, java.lang.String);

    # Remove check that final value returned from method is null, if passing
    # back Java platform type.
    static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
    static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String);

    # Null check for accessing a field from a parent class written in Java.
    static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
    static void checkFieldIsNotNull(java.lang.Object, java.lang.String);

    # Removes code generated from !! operator which converts Nullable type to
    # NonNull type. These would throw an NPE immediate after on access.
    static void checkNotNull(java.lang.Object, java.lang.String);
    static void checkNotNullParameter(java.lang.Object, java.lang.String);

    # Removes lateinit var check being used before being set. Check is applied
    # on every field access without this.
    static void throwUninitializedPropertyAccessException(java.lang.String);
}
# Strip verbose logs.
-assumenosideeffects class android.util.Log {
  static *** v(...);
  static *** isLoggable(...);
}
-assumenosideeffects class android.util.Slog {
  static *** v(...);
}
-maximumremovedandroidloglevel 2
