blob: 4ac544a7e47d0553daf1540d3474ebd076b402ae [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.
Christoffer Adamsenbc976282025-01-06 13:00:46 +01009# TODO(b/373579455): Evaluate if <init> needs to be kept.
10-keep public class com.android.settings*.** extends androidx.fragment.app.Fragment {
11 void <init>();
12}
Amith Yamasanib14e1e02010-11-02 09:52:29 -070013
Fan Zhang917f1012018-02-21 15:22:25 -080014# Keep all preference controllers needed by slice and DashboardFragment.
Beverly Taiaaa52b42019-02-06 15:44:20 +000015-keep class * extends com.android.settings.core.BasePreferenceController {
Fan Zhang917f1012018-02-21 15:22:25 -080016 *;
17}
18
19-keep class * extends com.android.settings.core.TogglePreferenceController {
20 *;
21}
22
Justin Klaassend770c052016-06-28 19:26:43 -070023# We want to keep methods in Activity that could be used in the XML attribute onClick.
Jared Duke4c8bae72022-09-19 14:57:35 -070024-keepclassmembers class com.android.settings*.** extends android.app.Activity {
Justin Klaassenab704112016-08-01 16:16:40 -070025 public void *(android.view.View);
26 public void *(android.view.MenuItem);
Jean Chalard0824d312011-12-02 17:47:09 +090027}
Udam Saini8ef4c622016-02-03 17:31:11 -080028
Justin Klaassend770c052016-06-28 19:26:43 -070029# Keep setters in Views so that animations can still work.
Jared Duke4c8bae72022-09-19 14:57:35 -070030-keep public class com.android.settings*.** extends android.view.View {
Justin Klaassend770c052016-06-28 19:26:43 -070031 public <init>(android.content.Context);
32 public <init>(android.content.Context, android.util.AttributeSet);
33 public <init>(android.content.Context, android.util.AttributeSet, int);
34
35 void set*(***);
36 *** get*();
37}
38
39# Keep classes that may be inflated from XML.
Jared Duke4c8bae72022-09-19 14:57:35 -070040-keepclasseswithmembers class com.android.settings*.** {
Udam Saini8ef4c622016-02-03 17:31:11 -080041 public <init>(android.content.Context, android.util.AttributeSet);
Justin Klaassend770c052016-06-28 19:26:43 -070042}
Jared Duke4c8bae72022-09-19 14:57:35 -070043-keepclasseswithmembers class com.android.settings*.** {
Justin Klaassen478b5a82016-06-21 18:31:16 -070044 public <init>(android.content.Context, android.util.AttributeSet, int);
Anna Galusza16d58e72016-03-22 13:07:44 -070045}
Jared Duke4c8bae72022-09-19 14:57:35 -070046-keepclasseswithmembers class com.android.settings*.** {
Matthew Fritzeb2775572017-12-05 10:46:47 -080047 public <init>(android.content.Context, android.util.AttributeSet, int, int);
48}
Justin Klaassenab704112016-08-01 16:16:40 -070049
Justin Klaassenab704112016-08-01 16:16:40 -070050# Keep specific fields used via reflection.
51-keepclassmembers class * {
52 public static ** SEARCH_INDEX_DATA_PROVIDER;
53 public static ** SUMMARY_PROVIDER_FACTORY;
54}
Christoffer Adamsenbc976282025-01-06 13:00:46 +010055# TODO(b/373579455): Evaluate if <init> needs to be kept.
56-keep class androidx.core.app.CoreComponentFactory {
57 void <init>();
58}
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}
Tsung-Mao Fang18ad0c42021-08-17 18:28:06 +080069
70# Keep WM Jetpack classes and callbacks
71-keep class androidx.window.extensions.** { *; }
72-dontwarn androidx.window.extensions.**
73-keep class androidx.window.** { *; }
Kyle Zhang7dbe6512024-06-11 18:45:11 +000074
75# Keep the com.android.settings.media_drm.FakeFeatureFlagsImpl
76-keep class com.android.settings.media_drm.FakeFeatureFlagsImpl { *; }