summaryrefslogtreecommitdiff
path: root/Tethering/proguard.flags
blob: 2905e283bbabe0efc6d72338006aa180bcc5870e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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>;
}