blob: b66a7862df2a524ff60d8ae3bcbd520326e0458d [file] [log] [blame]
Justin Klaassend770c052016-06-28 19:26:43 -07001# This is a configuration file for ProGuard.
2# http://proguard.sourceforge.net/index.html#manual/usage.html
3
Søren Gjessed9ce7972018-03-21 15:13:29 +01004# Some tests use thenThrow from Mockito which require information on
5# checked exceptions.
6-keepattributes Exceptions
7
Daisuke Miyakawac81adf52010-08-12 13:04:43 -07008# Keep all Fragments in this package, which are used by reflection.
tmfang27c84de2018-06-28 11:39:05 +08009-keep public class com.android.settings.** extends androidx.fragment.app.Fragment
Amith Yamasanib14e1e02010-11-02 09:52:29 -070010
Fan Zhang917f1012018-02-21 15:22:25 -080011# Keep all preference controllers needed by slice and DashboardFragment.
Beverly Taiaaa52b42019-02-06 15:44:20 +000012-keep class * extends com.android.settings.core.BasePreferenceController {
Fan Zhang917f1012018-02-21 15:22:25 -080013 *;
14}
15
16-keep class * extends com.android.settings.core.TogglePreferenceController {
17 *;
18}
19
Justin Klaassend770c052016-06-28 19:26:43 -070020# We want to keep methods in Activity that could be used in the XML attribute onClick.
Justin Klaassen478b5a82016-06-21 18:31:16 -070021-keepclassmembers class * extends android.app.Activity {
Justin Klaassenab704112016-08-01 16:16:40 -070022 public void *(android.view.View);
23 public void *(android.view.MenuItem);
Jean Chalard0824d312011-12-02 17:47:09 +090024}
Udam Saini8ef4c622016-02-03 17:31:11 -080025
Justin Klaassend770c052016-06-28 19:26:43 -070026# 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);
31
32 void set*(***);
33 *** get*();
34}
35
36# Keep classes that may be inflated from XML.
Justin Klaassen478b5a82016-06-21 18:31:16 -070037-keepclasseswithmembers class * {
Udam Saini8ef4c622016-02-03 17:31:11 -080038 public <init>(android.content.Context, android.util.AttributeSet);
Justin Klaassend770c052016-06-28 19:26:43 -070039}
40-keepclasseswithmembers class * {
Justin Klaassen478b5a82016-06-21 18:31:16 -070041 public <init>(android.content.Context, android.util.AttributeSet, int);
Anna Galusza16d58e72016-03-22 13:07:44 -070042}
Matthew Fritzeb2775572017-12-05 10:46:47 -080043-keepclasseswithmembers class * {
44 public <init>(android.content.Context, android.util.AttributeSet, int, int);
45}
Justin Klaassenab704112016-08-01 16:16:40 -070046
47# Keep annotated classes or class members.
Aurimas Liutikase0069d32018-04-17 11:22:43 -070048-keep @androidx.annotation.Keep class *
Justin Klaassenab704112016-08-01 16:16:40 -070049-keepclassmembers class * {
Aurimas Liutikase0069d32018-04-17 11:22:43 -070050 @androidx.annotation.Keep *;
Justin Klaassenab704112016-08-01 16:16:40 -070051}
52
53# Keep specific fields used via reflection.
54-keepclassmembers class * {
55 public static ** SEARCH_INDEX_DATA_PROVIDER;
56 public static ** SUMMARY_PROVIDER_FACTORY;
57}
Aurimas Liutikase0069d32018-04-17 11:22:43 -070058-keep class androidx.core.app.CoreComponentFactory
Mill Chenfb499212018-09-17 22:06:05 +080059
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);
Jason Chiua68f8152018-10-29 17:58:55 +080063}
64
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);
68}