Fix pro-guard rules for service-nearby

(clean cherry-pick of downstream change)

Test: build and check classes in service-connectivity.jar.
Bug: 217115866
Merged-In: I9f7db4509bf8fe736f5d9fc08b164a20b2274aa8
Change-Id: Ia97b7ab645e3425780b335c699b57a6dc7589f2a
This commit is contained in:
Chun Zhang 2022-06-08 21:33:54 -07:00 committed by Remi NGUYEN VAN
parent 39e121cc88
commit 193797326e

View file

@ -8,11 +8,10 @@
# Prevent proguard from stripping out any nearby-service and fast-pair-lite-protos fields.
-keep class com.android.server.nearby.NearbyService { *; }
-keep class com.android.server.nearby.service.proto { *; }
# The lite proto runtime uses reflection to access fields based on the names in
# the schema, keep all the fields.
# This replicates the base proguard rule used by the build by default
# (proguard_basic_keeps.flags), but needs to be specified here because the
# com.google.protobuf package is jarjared to the below package.
-keepclassmembers class * extends com.android.connectivity.com.google.protobuf.MessageLite { <fields>; }
-keepclassmembers class * extends android.net.connectivity.com.google.protobuf.MessageLite { <fields>; }