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