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-keep public class com.android.settings*.** extends androidx.fragment.app.Fragment 10 11# Keep all preference controllers needed by slice and DashboardFragment. 12-keep class * extends com.android.settings.core.BasePreferenceController { 13 *; 14} 15 16-keep class * extends com.android.settings.core.TogglePreferenceController { 17 *; 18} 19 20# We want to keep methods in Activity that could be used in the XML attribute onClick. 21-keepclassmembers class com.android.settings*.** extends android.app.Activity { 22 public void *(android.view.View); 23 public void *(android.view.MenuItem); 24} 25 26# Keep setters in Views so that animations can still work. 27-keep public class com.android.settings*.** 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); 31 32 void set*(***); 33 *** get*(); 34} 35 36# Keep classes that may be inflated from XML. 37-keepclasseswithmembers class com.android.settings*.** { 38 public <init>(android.content.Context, android.util.AttributeSet); 39} 40-keepclasseswithmembers class com.android.settings*.** { 41 public <init>(android.content.Context, android.util.AttributeSet, int); 42} 43-keepclasseswithmembers class com.android.settings*.** { 44 public <init>(android.content.Context, android.util.AttributeSet, int, int); 45} 46 47# Keep specific fields used via reflection. 48-keepclassmembers class * { 49 public static ** SEARCH_INDEX_DATA_PROVIDER; 50 public static ** SUMMARY_PROVIDER_FACTORY; 51} 52-keep class androidx.core.app.CoreComponentFactory 53 54# Keep classes that implements CustomSliceable, which are used by reflection. 55-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable { 56 public <init>(android.content.Context); 57} 58 59# Keep classes that extends SliceBackgroundWorker, which are used by reflection. 60-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker { 61 public <init>(android.content.Context, android.net.Uri); 62} 63 64# Keep WM Jetpack classes and callbacks 65-keep class androidx.window.extensions.** { *; } 66-dontwarn androidx.window.extensions.** 67-keep class androidx.window.** { *; } 68