Only keep Parcelables if used
Use `-keepclassmembers` instead of `-keep` for Parcelable types and their CREATOR members. This allows shrinking of Parcelable types that aren't referenced while still preserving the necessary CREATOR member when the classes are kept. This saves ~3MB across various platform targets. Bug: 238670321 Test: m + presubmit Change-Id: I13508073dbc07e28aa93bb6604c8f838bcf72646
This commit is contained in:
parent
2a9b910bf4
commit
9d27a928f2
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@
|
|||
# -keep class * extends android.app.BackupAgent
|
||||
|
||||
# Parcelable CREATORs must be kept for Parcelable functionality
|
||||
-keep class * implements android.os.Parcelable {
|
||||
-keepclassmembers class * implements android.os.Parcelable {
|
||||
public static final ** CREATOR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue