OSDN Git Service

Merge cherrypicks of [10301183, 10301340, 10301110, 10299537, 10300908, 10301450...
[android-x86/packages-apps-Settings.git] / proguard.flags
index 43a038b..b66a786 100644 (file)
@@ -1,8 +1,12 @@
 # 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 {
@@ -41,9 +45,9 @@
 }
 
 # 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 android.support.v4.app.CoreComponentFactory
+-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);
+}