R8 implicitly keeps the default constructor when no member rules are specified. Future versions of R8 will require apps to explicitly keep the default constructors that are required for the build to work. This conservatively changes all keep rules that currently keep the default constructor to explicitly keep the default constructor. Future work will attempt to tighten up the rules that do not require the default constructor to be kept. Bug: 373579455 Test: existing Change-Id: I58cf6b4286f696ea38290d888f20c8dcf18b9ede
77 lines
2.8 KiB
Plaintext
77 lines
2.8 KiB
Plaintext
# This is a configuration file for ProGuard.
|
|
# http://proguard.sourceforge.net/index.html#manual/usage.html
|
|
|
|
# Some tests use thenThrow from Mockito which require information on
|
|
# checked exceptions.
|
|
-keepattributes Exceptions
|
|
|
|
# Keep all Fragments in this package, which are used by reflection.
|
|
# TODO(b/373579455): Evaluate if <init> needs to be kept.
|
|
-keep public class com.android.settings*.** extends androidx.fragment.app.Fragment {
|
|
void <init>();
|
|
}
|
|
|
|
# Keep all preference controllers needed by slice and DashboardFragment.
|
|
-keep class * extends com.android.settings.core.BasePreferenceController {
|
|
*;
|
|
}
|
|
|
|
-keep class * extends com.android.settings.core.TogglePreferenceController {
|
|
*;
|
|
}
|
|
|
|
# We want to keep methods in Activity that could be used in the XML attribute onClick.
|
|
-keepclassmembers class com.android.settings*.** extends android.app.Activity {
|
|
public void *(android.view.View);
|
|
public void *(android.view.MenuItem);
|
|
}
|
|
|
|
# Keep setters in Views so that animations can still work.
|
|
-keep public class com.android.settings*.** extends android.view.View {
|
|
public <init>(android.content.Context);
|
|
public <init>(android.content.Context, android.util.AttributeSet);
|
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
|
|
|
void set*(***);
|
|
*** get*();
|
|
}
|
|
|
|
# Keep classes that may be inflated from XML.
|
|
-keepclasseswithmembers class com.android.settings*.** {
|
|
public <init>(android.content.Context, android.util.AttributeSet);
|
|
}
|
|
-keepclasseswithmembers class com.android.settings*.** {
|
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
|
}
|
|
-keepclasseswithmembers class com.android.settings*.** {
|
|
public <init>(android.content.Context, android.util.AttributeSet, int, int);
|
|
}
|
|
|
|
# Keep specific fields used via reflection.
|
|
-keepclassmembers class * {
|
|
public static ** SEARCH_INDEX_DATA_PROVIDER;
|
|
public static ** SUMMARY_PROVIDER_FACTORY;
|
|
}
|
|
# TODO(b/373579455): Evaluate if <init> needs to be kept.
|
|
-keep class androidx.core.app.CoreComponentFactory {
|
|
void <init>();
|
|
}
|
|
|
|
# Keep classes that implements CustomSliceable, which are used by reflection.
|
|
-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
|
|
public <init>(android.content.Context);
|
|
}
|
|
|
|
# Keep classes that extends SliceBackgroundWorker, which are used by reflection.
|
|
-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
|
|
public <init>(android.content.Context, android.net.Uri);
|
|
}
|
|
|
|
# Keep WM Jetpack classes and callbacks
|
|
-keep class androidx.window.extensions.** { *; }
|
|
-dontwarn androidx.window.extensions.**
|
|
-keep class androidx.window.** { *; }
|
|
|
|
# Keep the com.android.settings.media_drm.FakeFeatureFlagsImpl
|
|
-keep class com.android.settings.media_drm.FakeFeatureFlagsImpl { *; }
|