diff --git a/proguard.flags b/proguard.flags index 5482f1c52d0..492404ce7be 100644 --- a/proguard.flags +++ b/proguard.flags @@ -6,7 +6,7 @@ -keepattributes Exceptions # Keep all Fragments in this package, which are used by reflection. --keep public class com.android.settings.** extends androidx.fragment.app.Fragment +-keep public class com.android.settings*.** extends androidx.fragment.app.Fragment # Keep all preference controllers needed by slice and DashboardFragment. -keep class * extends com.android.settings.core.BasePreferenceController { @@ -18,13 +18,13 @@ } # We want to keep methods in Activity that could be used in the XML attribute onClick. --keepclassmembers class * extends android.app.Activity { +-keepclassmembers class com.android.settings*.** extends android.app.Activity { public void *(android.view.View); public void *(android.view.MenuItem); } # Keep setters in Views so that animations can still work. --keep public class * extends android.view.View { +-keep public class com.android.settings*.** extends android.view.View { public (android.content.Context); public (android.content.Context, android.util.AttributeSet); public (android.content.Context, android.util.AttributeSet, int); @@ -34,22 +34,16 @@ } # Keep classes that may be inflated from XML. --keepclasseswithmembers class * { +-keepclasseswithmembers class com.android.settings*.** { public (android.content.Context, android.util.AttributeSet); } --keepclasseswithmembers class * { +-keepclasseswithmembers class com.android.settings*.** { public (android.content.Context, android.util.AttributeSet, int); } --keepclasseswithmembers class * { +-keepclasseswithmembers class com.android.settings*.** { public (android.content.Context, android.util.AttributeSet, int, int); } -# Keep annotated classes or class members. --keep @androidx.annotation.Keep class * --keepclassmembers class * { - @androidx.annotation.Keep *; -} - # Keep specific fields used via reflection. -keepclassmembers class * { public static ** SEARCH_INDEX_DATA_PROVIDER;