1 # This is a configuration file for ProGuard.
2 # http://proguard.sourceforge.net/index.html#manual/usage.html
4 # Some tests use thenThrow from Mockito which require information on
6 -keepattributes Exceptions
8 # Keep all Fragments in this package, which are used by reflection.
9 -keep public class com.android.settings.** extends androidx.fragment.app.Fragment
11 # Keep all preference controllers needed by slice and DashboardFragment.
12 -keep class * extends com.android.settings.core.BasePreferenceController {
16 -keep class * extends com.android.settings.core.TogglePreferenceController {
20 # We want to keep methods in Activity that could be used in the XML attribute onClick.
21 -keepclassmembers class * extends android.app.Activity {
22 public void *(android.view.View);
23 public void *(android.view.MenuItem);
26 # Keep setters in Views so that animations can still work.
27 -keep public class * extends android.view.View {
28 public <init>(android.content.Context);
29 public <init>(android.content.Context, android.util.AttributeSet);
30 public <init>(android.content.Context, android.util.AttributeSet, int);
36 # Keep classes that may be inflated from XML.
37 -keepclasseswithmembers class * {
38 public <init>(android.content.Context, android.util.AttributeSet);
40 -keepclasseswithmembers class * {
41 public <init>(android.content.Context, android.util.AttributeSet, int);
43 -keepclasseswithmembers class * {
44 public <init>(android.content.Context, android.util.AttributeSet, int, int);
47 # Keep annotated classes or class members.
48 -keep @androidx.annotation.Keep class *
49 -keepclassmembers class * {
50 @androidx.annotation.Keep *;
53 # Keep specific fields used via reflection.
54 -keepclassmembers class * {
55 public static ** SEARCH_INDEX_DATA_PROVIDER;
56 public static ** SUMMARY_PROVIDER_FACTORY;
58 -keep class androidx.core.app.CoreComponentFactory
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);
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);