Nearby: Turn off proguard optimization of proto classes.

Add a proguard rule to prevent proguard from stripping out
fast-pair-lite-protos classes/fields.

Fix: 218607668
Test: atest CtsNearbyFastPairTestCases and manual steps in b/218607668#comment2
Ignore-AOSP-First: Nearby is not yet in AOSP. This introduces minimal
                   unavoidable merge conflicts until it is merged there.
Change-Id: I947c9e3b6ebc232e230782f6345c5cb6893138e6
diff --git a/service/jarjar-rules.txt b/service/jarjar-rules.txt
index 65ed8a3..ee05df5 100644
--- a/service/jarjar-rules.txt
+++ b/service/jarjar-rules.txt
@@ -106,5 +106,8 @@
 # From the API shims
 rule com.android.networkstack.apishim.** com.android.connectivity.@0
 
+# From fast-pair-lite-protos
+rule service.proto.** com.android.server.nearby.@0
+
 # Remaining are connectivity sources in com.android.server and com.android.server.connectivity:
 # TODO: move to a subpackage of com.android.connectivity (such as com.android.connectivity.server)
diff --git a/service/proguard.flags b/service/proguard.flags
index 4651088..2b20ddd 100644
--- a/service/proguard.flags
+++ b/service/proguard.flags
@@ -6,10 +6,11 @@
 -keep class com.android.net.** { *; }
 -keep class com.android.server.** { *; }
 
-# Prevent proguard from stripping out any nearby-service.
+# Prevent proguard from stripping out any nearby-service and fast-pair-lite-protos fields.
 # TODO: This could be optimized in the future to only keep the critical
 # entry points and then let proguard strip out any unused code within
-# the service.
+# the service. "com.android.server.nearby.service.proto" must be kept to prevent proguard
+# from stripping out any fast-pair-lite-protos fields.
 -keep class com.android.server.nearby.** { *; }
 
 # The lite proto runtime uses reflection to access fields based on the names in