Files
lawnchair/proguard.pro
2022-07-17 13:33:20 +08:00

160 lines
5.9 KiB
Prolog

-keep,allowshrinking,allowoptimization class com.android.launcher3.** {
*;
}
-keep class com.android.launcher3.graphics.ShadowDrawable {
public <init>(...);
}
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
# Proguard will strip methods required for talkback to properly scroll to
# next row when focus is on the last item of last row when using a RecyclerView
# Keep optimized and shrunk proguard to prevent issues like this when using
# support jar.
-keep class androidx.recyclerview.widget.RecyclerView { *; }
# Fragments
-keep class ** extends androidx.fragment.app.Fragment {
public <init>(...);
}
-keep class ** extends android.app.Fragment {
public <init>(...);
}
## Prevent obfuscating various overridable objects
-keep class ** implements com.android.launcher3.util.ResourceBasedOverride {
public <init>(...);
}
-keep interface com.android.launcher3.userevent.nano.LauncherLogProto.** {
*;
}
-keep interface com.android.launcher3.model.nano.LauncherDumpProto.** {
*;
}
# Discovery bounce animation
-keep class com.android.launcher3.allapps.DiscoveryBounce$VerticalProgressWrapper {
public void setProgress(float);
public float getProgress();
}
# BUG(70852369): Suppress additional warnings after changing from Proguard to R8
-dontwarn android.app.**
-dontwarn android.graphics.**
-dontwarn android.os.**
-dontwarn android.view.**
-dontwarn android.window.**
# Ignore warnings for hidden utility classes referenced from the shared lib
-dontwarn com.android.internal.util.**
################ Do not optimize recents lib #############
-keep class com.android.systemui.** {
*;
}
-keep class com.android.quickstep.** {
*;
}
# Don't touch the restrictionbypass code
-keep class org.chickenhook.restrictionbypass.** { *; }
# Silence warnings from Compose tooling
-dontwarn org.jetbrains.kotlin.**
-dontwarn androidx.compose.animation.tooling.ComposeAnimation
-dontwarn sun.misc.Unsafe
# Silence warnings about classes that are available at runtime
-dontwarn android.provider.DeviceConfig
-dontwarn com.android.internal.colorextraction.ColorExtractor$GradientColors
-dontwarn com.android.internal.logging.MetricsLogger
-dontwarn com.android.internal.os.SomeArgs
-dontwarn android.content.pm.ParceledListSlice
-dontwarn com.android.internal.policy.ScreenDecorationsUtils
-dontwarn android.util.StatsEvent
-dontwarn android.service.wallpaper.IWallpaperEngine
-dontwarn android.content.pm.UserInfo
-dontwarn com.android.internal.app.IVoiceInteractionManagerService$Stub
-dontwarn com.android.internal.app.IVoiceInteractionManagerService
-dontwarn com.android.internal.annotations.VisibleForTesting
-dontwarn android.provider.DeviceConfig$OnPropertiesChangedListener
-dontwarn android.util.StatsEvent$Builder
-dontwarn com.android.internal.colorextraction.types.Tonal
-dontwarn android.content.pm.LauncherApps$AppUsageLimit
-dontwarn android.provider.SearchIndexablesContract
-dontwarn android.provider.SearchIndexablesProvider
-dontwarn android.content.pm.IPackageManager
# Preserve Protobuf generated code
-keep class com.android.launcher3.tracing.nano.LauncherTraceFileProto$* { *; }
-keep class com.android.launcher3.logger.nano.LauncherAtom$* { *; }
-keep class com.android.launcher3.tracing.nano.LauncherTraceEntryProto$* { *; }
-keep class com.android.launcher3.tracing.nano.TouchInteractionServiceProto$* { *; }
-keep class com.android.launcher3.userevent.nano.LauncherLogProto$* { *; }
-keep class com.android.launcher3.tracing.nano.LauncherTraceProto$* { *; }
-keep class com.android.launcher3.userevent.nano.LauncherLogExtensions$* { *; }
-keep class com.android.launcher3.tracing.LauncherTraceFileProto$* { *; }
-keep class com.android.launcher3.logger.LauncherAtom$* { *; }
-keep class com.android.launcher3.tracing.LauncherTraceEntryProto$* { *; }
-keep class com.android.launcher3.tracing.TouchInteractionServiceProto$* { *; }
-keep class com.android.launcher3.userevent.LauncherLogProto$* { *; }
-keep class com.android.launcher3.tracing.LauncherTraceProto$* { *; }
-keep class com.android.launcher3.userevent.LauncherLogExtensions$* { *; }
-keep class app.lawnchair.LawnchairProto$* { *; }
-keep class com.google.protobuf.Timestamp { *; }
-keepattributes InnerClasses
-keep class app.lawnchair.compatlib.** {
*;
}
-keep class com.android.** {
*;
}
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}
# Keep `INSTANCE.serializer()` of serializable objects.
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
# Serializer for classes with named companion objects are retrieved using `getDeclaredClasses`.
# If you have any, uncomment and replace classes with those containing named companion objects.
#-keepattributes InnerClasses # Needed for `getDeclaredClasses`.
#-if @kotlinx.serialization.Serializable class
#com.example.myapplication.HasNamedCompanion, # <-- List serializable classes with named companions.
#com.example.myapplication.HasNamedCompanion2
#{
# static **$* *;
#}
#-keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept.
# static <1>$$serializer INSTANCE;
#}