blob: 0a299ed2340124cad4dfcb3393b6e9a14631ad05 [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
Daisuke Miyakawac81adf52010-08-12 13:04:43 -07004# Keep all Fragments in this package, which are used by reflection.
Justin Klaassen478b5a82016-06-21 18:31:16 -07005-keep public class com.android.settings.** extends android.app.Fragment
Amith Yamasanib14e1e02010-11-02 09:52:29 -07006
Justin Klaassend770c052016-06-28 19:26:43 -07007# We want to keep methods in Activity that could be used in the XML attribute onClick.
Justin Klaassen478b5a82016-06-21 18:31:16 -07008-keepclassmembers class * extends android.app.Activity {
Justin Klaassenab704112016-08-01 16:16:40 -07009 public void *(android.view.View);
10 public void *(android.view.MenuItem);
Jean Chalard0824d312011-12-02 17:47:09 +090011}
Udam Saini8ef4c622016-02-03 17:31:11 -080012
Justin Klaassend770c052016-06-28 19:26:43 -070013# Keep setters in Views so that animations can still work.
14-keep public class * extends android.view.View {
15 public <init>(android.content.Context);
16 public <init>(android.content.Context, android.util.AttributeSet);
17 public <init>(android.content.Context, android.util.AttributeSet, int);
18
19 void set*(***);
20 *** get*();
21}
22
23# Keep classes that may be inflated from XML.
Justin Klaassen478b5a82016-06-21 18:31:16 -070024-keepclasseswithmembers class * {
Udam Saini8ef4c622016-02-03 17:31:11 -080025 public <init>(android.content.Context, android.util.AttributeSet);
Justin Klaassend770c052016-06-28 19:26:43 -070026}
27-keepclasseswithmembers class * {
Justin Klaassen478b5a82016-06-21 18:31:16 -070028 public <init>(android.content.Context, android.util.AttributeSet, int);
Anna Galusza16d58e72016-03-22 13:07:44 -070029}
Matthew Fritzeb2775572017-12-05 10:46:47 -080030-keepclasseswithmembers class * {
31 public <init>(android.content.Context, android.util.AttributeSet, int, int);
32}
Justin Klaassenab704112016-08-01 16:16:40 -070033
34# Keep annotated classes or class members.
35-keep @android.support.annotation.Keep class *
36-keepclassmembers class * {
37 @android.support.annotation.Keep *;
38}
39
40# Keep specific fields used via reflection.
41-keepclassmembers class * {
42 public static ** SEARCH_INDEX_DATA_PROVIDER;
43 public static ** SUMMARY_PROVIDER_FACTORY;
44}
Tony Mantlerbd6fcdb2017-11-15 11:19:40 -080045
46# Keep classes, annotations and members used by Lifecycle
47-keepattributes *Annotation*
48
49-keepclassmembers enum android.arch.lifecycle.Lifecycle$Event {
50 <fields>;
51}
52
53-keep class * implements android.arch.lifecycle.LifecycleObserver {
54}
55
56-keep class * implements android.arch.lifecycle.GeneratedAdapter {
57 <init>(...);
58}
59
60-keepclassmembers class ** {
61 @android.arch.lifecycle.OnLifecycleEvent *;
62}