1# Keep class's integer static field for MessageUtils to parsing their name. 2-keepclassmembers class com.android.server.**,android.net.**,com.android.networkstack.** { 3 static final % POLICY_*; 4 static final % NOTIFY_TYPE_*; 5 static final % TRANSPORT_*; 6 static final % CMD_*; 7 static final % EVENT_*; 8} 9 10-keep class com.android.networkstack.tethering.util.BpfMap { 11 native <methods>; 12} 13 14-keep class com.android.networkstack.tethering.util.TcUtils { 15 native <methods>; 16} 17 18-keep class com.android.networkstack.tethering.util.TetheringUtils { 19 native <methods>; 20} 21 22# Ensure runtime-visible field annotations are kept when using R8 full mode. 23-keepattributes RuntimeVisibleAnnotations,AnnotationDefault 24-keep interface com.android.networkstack.tethering.util.Struct$Field { 25 *; 26} 27-keepclassmembers public class * extends com.android.networkstack.tethering.util.Struct { 28 *; 29} 30 31# The lite proto runtime uses reflection to access fields based on the names in 32# the schema, keep all the fields. 33-keepclassmembers class * extends com.android.networkstack.tethering.protobuf.MessageLite { 34 <fields>; 35} 36