• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This is a configuration file for ProGuard.
2# http://proguard.sourceforge.net/index.html#manual/usage.html
3
4# Some tests use thenThrow from Mockito which require information on
5# checked exceptions.
6-keepattributes Exceptions
7
8# Keep all Fragments in this package, which are used by reflection.
9# TODO(b/373579455): Evaluate if <init> needs to be kept.
10-keep public class com.android.settings*.** extends androidx.fragment.app.Fragment {
11    void <init>();
12}
13
14# Keep all preference controllers needed by slice and DashboardFragment.
15-keep class * extends com.android.settings.core.BasePreferenceController {
16    *;
17}
18
19-keep class * extends com.android.settings.core.TogglePreferenceController {
20    *;
21}
22
23# We want to keep methods in Activity that could be used in the XML attribute onClick.
24-keepclassmembers class com.android.settings*.** extends android.app.Activity {
25    public void *(android.view.View);
26    public void *(android.view.MenuItem);
27}
28
29# Keep setters in Views so that animations can still work.
30-keep public class com.android.settings*.** extends android.view.View {
31    public <init>(android.content.Context);
32    public <init>(android.content.Context, android.util.AttributeSet);
33    public <init>(android.content.Context, android.util.AttributeSet, int);
34
35    void set*(***);
36    *** get*();
37}
38
39# Keep classes that may be inflated from XML.
40-keepclasseswithmembers class com.android.settings*.** {
41    public <init>(android.content.Context, android.util.AttributeSet);
42}
43-keepclasseswithmembers class com.android.settings*.** {
44    public <init>(android.content.Context, android.util.AttributeSet, int);
45}
46-keepclasseswithmembers class com.android.settings*.** {
47    public <init>(android.content.Context, android.util.AttributeSet, int, int);
48}
49
50# Keep specific fields used via reflection.
51-keepclassmembers class * {
52    public static ** SEARCH_INDEX_DATA_PROVIDER;
53    public static ** SUMMARY_PROVIDER_FACTORY;
54}
55# TODO(b/373579455): Evaluate if <init> needs to be kept.
56-keep class androidx.core.app.CoreComponentFactory {
57    void <init>();
58}
59
60# Keep classes that implements CustomSliceable, which are used by reflection.
61-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
62    public <init>(android.content.Context);
63}
64
65# Keep classes that extends SliceBackgroundWorker, which are used by reflection.
66-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
67    public <init>(android.content.Context, android.net.Uri);
68}
69
70# Keep WM Jetpack classes and callbacks
71-keep class androidx.window.extensions.** { *; }
72-dontwarn androidx.window.extensions.**
73-keep class androidx.window.** { *; }
74
75# Keep the com.android.settings.media_drm.FakeFeatureFlagsImpl
76-keep class com.android.settings.media_drm.FakeFeatureFlagsImpl { *; }
77