blob: 47e284866b3b3118962a131427e1b4e4f1cb04e7 [file] [log] [blame]
markchien9d353822019-12-16 20:15:20 +08001# Keep class's integer static field for MessageUtils to parsing their name.
Chalard Jean88edc352022-09-29 18:01:49 +09002-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_*;
markchien9d353822019-12-16 20:15:20 +08008}
9
Tyler Weare8043ca72021-10-19 10:59:01 -070010-keep class com.android.networkstack.tethering.util.BpfMap {
markchien70526882020-11-12 00:17:15 +080011 native <methods>;
12}
13
Patrick Rohrb194dfe2022-01-20 22:06:24 +010014-keep class com.android.networkstack.tethering.util.TcUtils {
15 native <methods>;
16}
17
Mark87800832022-12-14 09:03:09 +000018-keep class com.android.networkstack.tethering.util.TetheringUtils {
19 native <methods>;
20}
21
Jared Duke4ed99422022-04-19 21:45:04 +000022# 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}
markchien70526882020-11-12 00:17:15 +080027-keepclassmembers public class * extends com.android.networkstack.tethering.util.Struct {
Remi NGUYEN VAN9a82bbf2021-04-14 01:30:55 +000028 *;
markchien70526882020-11-12 00:17:15 +080029}
30
Wayne Ma71d66392022-03-03 10:15:09 +080031# 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>;
Chalard Jean88edc352022-09-29 18:01:49 +090035}