blob: 2905e283bbabe0efc6d72338006aa180bcc5870e [file] [log] [blame]
markchien9d353822019-12-16 20:15:20 +08001# Keep class's integer static field for MessageUtils to parsing their name.
Chiachang Wang14aaefc2020-07-29 12:05:04 +08002-keep class com.android.networkstack.tethering.Tethering$TetherMainSM {
markchien9d353822019-12-16 20:15:20 +08003 static final int CMD_*;
4 static final int EVENT_*;
5}
6
Tyler Weare8043ca72021-10-19 10:59:01 -07007-keep class com.android.networkstack.tethering.util.BpfMap {
markchien70526882020-11-12 00:17:15 +08008 native <methods>;
9}
10
Patrick Rohrb194dfe2022-01-20 22:06:24 +010011-keep class com.android.networkstack.tethering.util.TcUtils {
12 native <methods>;
13}
14
Jared Duke4ed99422022-04-19 21:45:04 +000015# 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}
markchien70526882020-11-12 00:17:15 +080020-keepclassmembers public class * extends com.android.networkstack.tethering.util.Struct {
Remi NGUYEN VAN9a82bbf2021-04-14 01:30:55 +000021 *;
markchien70526882020-11-12 00:17:15 +080022}
23
markchien9d353822019-12-16 20:15:20 +080024-keepclassmembers class android.net.ip.IpServer {
25 static final int CMD_*;
26}
Wayne Ma71d66392022-03-03 10:15:09 +080027
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}