• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1-include proguard_kotlin.flags
2
3# VendorServices implements CoreStartable and may be instantiated reflectively in
4# SystemUIApplication#startAdditionalStartable.
5# TODO(b/373579455): Rewrite this to a @UsesReflection keep annotation.
6-keep class com.android.systemui.VendorServices {
7  public void <init>();
8}
9
10# Needed to ensure callback field references are kept in their respective
11# owning classes when the downstream callback registrars only store weak refs.
12# Note that we restrict this to SysUISingleton classes, as other registering
13# classes should either *always* unregister or *never* register from their
14# constructor. We also keep callback class names for easier debugging.
15# TODO(b/373579455): Evaluate if <init> needs to be kept.
16-keepnames @com.android.systemui.util.annotations.WeaklyReferencedCallback class * {
17  void <init>();
18}
19# TODO(b/373579455): Evaluate if <init> needs to be kept.
20-keepnames class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback ** {
21  void <init>();
22}
23-if @com.android.systemui.util.annotations.WeaklyReferencedCallback class *
24-keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * {
25  <1> *;
26}
27-if class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback **
28-keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * {
29  <1> *;
30}
31
32# TODO(b/373579455): Evaluate if <init> needs to be kept.
33-keep class androidx.core.app.CoreComponentFactory {
34  void <init>();
35}
36
37# Keep the wm shell lib
38# TODO(b/373579455): Evaluate if <init> needs to be kept.
39-keep class com.android.wm.shell.* {
40  void <init>();
41}
42# Keep the protolog group methods that are called by the generated code
43-keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup {
44    *;
45}
46
47# Prevent optimization or access modification of any referenced code that may
48# conflict with code in the bootclasspath.
49# TODO(b/222468116): Resolve such collisions in the build system.
50-keepnames class android.**.nano.** { *; }
51-keepnames class com.android.**.nano.** { *; }
52-keepnames class com.android.internal.protolog.** { *; }
53-keepnames class android.hardware.common.** { *; }
54
55# TODO(b/316553881): Statically linking flags into SystemUI and bootclasspath might not be a
56# good idea in the first place
57-keepnames class com.android.window.flags.Flags { public *; }
58
59
60# 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
63
64# Strip verbose logs.
65-assumenosideeffects class android.util.Log {
66  static *** v(...);
67  static *** isLoggable(...);
68}
69-assumenosideeffects class android.util.Slog {
70  static *** v(...);
71}
72-maximumremovedandroidloglevel 2
73
74#Keep the R
75-keepclassmembers class com.android.systemui.customization.R$* {
76    public static <fields>;
77}
78