OSDN Git Service

Merge cherrypicks of [10301183, 10301340, 10301110, 10299537, 10300908, 10301450...
[android-x86/packages-apps-Settings.git] / proguard.flags
index d644f47..b66a786 100644 (file)
@@ -1,8 +1,21 @@
 # This is a configuration file for ProGuard.
 # http://proguard.sourceforge.net/index.html#manual/usage.html
 
+# Some tests use thenThrow from Mockito which require information on
+# checked exceptions.
+-keepattributes Exceptions
+
 # Keep all Fragments in this package, which are used by reflection.
--keep public class com.android.settings.** extends android.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 {
+    *;
+}
+
+-keep class * extends com.android.settings.core.TogglePreferenceController {
+    *;
+}
 
 # We want to keep methods in Activity that could be used in the XML attribute onClick.
 -keepclassmembers class * extends android.app.Activity {
 -keepclasseswithmembers class * {
     public <init>(android.content.Context, android.util.AttributeSet, int);
 }
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int, int);
+}
 
 # Keep annotated classes or class members.
--keep @android.support.annotation.Keep class *
+-keep @androidx.annotation.Keep class *
 -keepclassmembers class * {
-    @android.support.annotation.Keep *;
+    @androidx.annotation.Keep *;
 }
 
 # Keep specific fields used via reflection.
     public static ** SEARCH_INDEX_DATA_PROVIDER;
     public static ** SUMMARY_PROVIDER_FACTORY;
 }
+-keep class androidx.core.app.CoreComponentFactory
+
+# Keep classes that implements CustomSliceable, which are used by reflection.
+-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
+    public <init>(android.content.Context);
+}
+
+# Keep classes that extends SliceBackgroundWorker, which are used by reflection.
+-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
+    public <init>(android.content.Context, android.net.Uri);
+}