Explicitly keep default constructor in rules without members
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
This commit is contained in:
@@ -6,7 +6,10 @@
|
|||||||
-keepattributes Exceptions
|
-keepattributes Exceptions
|
||||||
|
|
||||||
# Keep all Fragments in this package, which are used by reflection.
|
# Keep all Fragments in this package, which are used by reflection.
|
||||||
-keep public class com.android.settings*.** extends androidx.fragment.app.Fragment
|
# 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 all preference controllers needed by slice and DashboardFragment.
|
||||||
-keep class * extends com.android.settings.core.BasePreferenceController {
|
-keep class * extends com.android.settings.core.BasePreferenceController {
|
||||||
@@ -49,7 +52,10 @@
|
|||||||
public static ** SEARCH_INDEX_DATA_PROVIDER;
|
public static ** SEARCH_INDEX_DATA_PROVIDER;
|
||||||
public static ** SUMMARY_PROVIDER_FACTORY;
|
public static ** SUMMARY_PROVIDER_FACTORY;
|
||||||
}
|
}
|
||||||
-keep class androidx.core.app.CoreComponentFactory
|
# 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.
|
# Keep classes that implements CustomSliceable, which are used by reflection.
|
||||||
-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
|
-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
|
||||||
|
Reference in New Issue
Block a user