Ensure proguard doesn't over-optimize Flags Library.

In the main build, proguard is optimizing out Parcelable flags, which
means that clients of the library crash when they receive those flags
over the wire.

Telling proguard to keep Parcelable flags makes everything happy.

This fix is really for main, but the behavior is desired in qpr as
well, (even though proguard doesn't cause a problem in qpr).

Fixes: 254310572
Test: manually built and run on main/master
Change-Id: I541c405cd5642fae7c0cbdbf3ddcffd49e19eed1
This commit is contained in:
Dave Mankoff
2022-12-22 17:59:48 +00:00
parent 4475e9026c
commit 8ecf5775a6
2 changed files with 4 additions and 0 deletions

View File

@@ -85,6 +85,9 @@ java_library {
static_libs: [
"SystemUI-flag-types",
],
optimize: {
proguard_flags_files: ["proguard_flags.flags"],
},
java_version: "1.8",
min_sdk_version: "current",
}

View File

@@ -0,0 +1 @@
-keep class * implements com.android.systemui.flags.ParcelableFlag