blob: 2510debd427612449f09f31cb37dccbcd3a38537 [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
Jackeaglef903c532017-05-04 13:36:21 -040016-keep class com.blissroms.blissify.**
17
Fan Zhang917f1012018-02-21 15:22:25 -080018-keep class * extends com.android.settings.core.TogglePreferenceController {
19 *;
20}
21
Justin Klaassend770c052016-06-28 19:26:43 -070022# We want to keep methods in Activity that could be used in the XML attribute onClick.
Justin Klaassen478b5a82016-06-21 18:31:16 -070023-keepclassmembers class * extends android.app.Activity {
Justin Klaassenab704112016-08-01 16:16:40 -070024 public void *(android.view.View);
25 public void *(android.view.MenuItem);
Jean Chalard0824d312011-12-02 17:47:09 +090026}
Udam Saini8ef4c622016-02-03 17:31:11 -080027
Justin Klaassend770c052016-06-28 19:26:43 -070028# Keep setters in Views so that animations can still work.
29-keep public class * extends android.view.View {
30 public <init>(android.content.Context);
31 public <init>(android.content.Context, android.util.AttributeSet);
32 public <init>(android.content.Context, android.util.AttributeSet, int);
33
34 void set*(***);
35 *** get*();
36}
37
38# Keep classes that may be inflated from XML.
Justin Klaassen478b5a82016-06-21 18:31:16 -070039-keepclasseswithmembers class * {
Udam Saini8ef4c622016-02-03 17:31:11 -080040 public <init>(android.content.Context, android.util.AttributeSet);
Justin Klaassend770c052016-06-28 19:26:43 -070041}
42-keepclasseswithmembers class * {
Justin Klaassen478b5a82016-06-21 18:31:16 -070043 public <init>(android.content.Context, android.util.AttributeSet, int);
Anna Galusza16d58e72016-03-22 13:07:44 -070044}
Matthew Fritzeb2775572017-12-05 10:46:47 -080045-keepclasseswithmembers class * {
46 public <init>(android.content.Context, android.util.AttributeSet, int, int);
47}
Justin Klaassenab704112016-08-01 16:16:40 -070048
49# Keep annotated classes or class members.
Aurimas Liutikase0069d32018-04-17 11:22:43 -070050-keep @androidx.annotation.Keep class *
Justin Klaassenab704112016-08-01 16:16:40 -070051-keepclassmembers class * {
Aurimas Liutikase0069d32018-04-17 11:22:43 -070052 @androidx.annotation.Keep *;
Justin Klaassenab704112016-08-01 16:16:40 -070053}
54
55# Keep specific fields used via reflection.
56-keepclassmembers class * {
57 public static ** SEARCH_INDEX_DATA_PROVIDER;
58 public static ** SUMMARY_PROVIDER_FACTORY;
59}
Aurimas Liutikase0069d32018-04-17 11:22:43 -070060-keep class androidx.core.app.CoreComponentFactory
Mill Chenfb499212018-09-17 22:06:05 +080061
62# Keep classes that implements CustomSliceable, which are used by reflection.
63-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
64 public <init>(android.content.Context);
Jason Chiua68f8152018-10-29 17:58:55 +080065}
66
67# Keep classes that extends SliceBackgroundWorker, which are used by reflection.
68-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
69 public <init>(android.content.Context, android.net.Uri);
70}
jhenrique09d9c93ba2019-09-10 11:45:57 -030071
72# Custom rules
73-keep class com.google.android.settings.** { *; }