blob: d1c97f36da552a774870f2be02d02e97e5c896b2 [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.
Jared Duke4c8bae72022-09-19 14:57:35 -07009-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.
Jared Duke4c8bae72022-09-19 14:57:35 -070021-keepclassmembers class com.android.settings*.** 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.
Jared Duke4c8bae72022-09-19 14:57:35 -070027-keep public class com.android.settings*.** extends android.view.View {
Justin Klaassend770c052016-06-28 19:26:43 -070028 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.
Jared Duke4c8bae72022-09-19 14:57:35 -070037-keepclasseswithmembers class com.android.settings*.** {
Udam Saini8ef4c622016-02-03 17:31:11 -080038 public <init>(android.content.Context, android.util.AttributeSet);
Justin Klaassend770c052016-06-28 19:26:43 -070039}
Jared Duke4c8bae72022-09-19 14:57:35 -070040-keepclasseswithmembers class com.android.settings*.** {
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}
Jared Duke4c8bae72022-09-19 14:57:35 -070043-keepclasseswithmembers class com.android.settings*.** {
Matthew Fritzeb2775572017-12-05 10:46:47 -080044 public <init>(android.content.Context, android.util.AttributeSet, int, int);
45}
Justin Klaassenab704112016-08-01 16:16:40 -070046
Justin Klaassenab704112016-08-01 16:16:40 -070047# Keep specific fields used via reflection.
48-keepclassmembers class * {
49 public static ** SEARCH_INDEX_DATA_PROVIDER;
50 public static ** SUMMARY_PROVIDER_FACTORY;
51}
Aurimas Liutikase0069d32018-04-17 11:22:43 -070052-keep class androidx.core.app.CoreComponentFactory
Mill Chenfb499212018-09-17 22:06:05 +080053
54# Keep classes that implements CustomSliceable, which are used by reflection.
55-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
56 public <init>(android.content.Context);
Jason Chiua68f8152018-10-29 17:58:55 +080057}
58
59# Keep classes that extends SliceBackgroundWorker, which are used by reflection.
60-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
61 public <init>(android.content.Context, android.net.Uri);
62}
Tsung-Mao Fang18ad0c42021-08-17 18:28:06 +080063
64# Keep WM Jetpack classes and callbacks
65-keep class androidx.window.extensions.** { *; }
66-dontwarn androidx.window.extensions.**
67-keep class androidx.window.** { *; }
Kyle Zhang7dbe6512024-06-11 18:45:11 +000068
69# Keep the com.android.settings.media_drm.FakeFeatureFlagsImpl
70-keep class com.android.settings.media_drm.FakeFeatureFlagsImpl { *; }