Files
android_packages_modules_Co…/Tethering/proguard.flags
Jared Duke 4ed9942546 Fix R8 full mode for Tethering
Ensure runtime-visible field annotations are properly preserved
when using R8 full mode.

Bug: 215530220
Change-Id: I3d09fa122a03e5c86cbefc68e7dfabd56241dcfe
Test: m + presubmit
2022-04-19 21:45:05 +00:00

32 lines
1002 B
Plaintext

# Keep class's integer static field for MessageUtils to parsing their name.
-keep class com.android.networkstack.tethering.Tethering$TetherMainSM {
static final int CMD_*;
static final int EVENT_*;
}
-keep class com.android.networkstack.tethering.util.BpfMap {
native <methods>;
}
-keep class com.android.networkstack.tethering.util.TcUtils {
native <methods>;
}
# Ensure runtime-visible field annotations are kept when using R8 full mode.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
-keep interface com.android.networkstack.tethering.util.Struct$Field {
*;
}
-keepclassmembers public class * extends com.android.networkstack.tethering.util.Struct {
*;
}
-keepclassmembers class android.net.ip.IpServer {
static final int CMD_*;
}
# The lite proto runtime uses reflection to access fields based on the names in
# the schema, keep all the fields.
-keepclassmembers class * extends com.android.networkstack.tethering.protobuf.MessageLite {
<fields>;
}