blob: b1b8a516ec9ebb0337b0df6b2f13ad172687f55a [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.
Justin Klaassen478b5a82016-06-21 18:31:16 -07009-keep public class com.android.settings.** extends android.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.
12-keep class * extends com.android.settings.core.BasePreferenceController {
13 *;
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.
48-keep @android.support.annotation.Keep class *
49-keepclassmembers class * {
50 @android.support.annotation.Keep *;
51}
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}