2025-01-02 08:27:30 -08:00
|
|
|
# Keep JNI registered methods
|
|
|
|
|
-keepclasseswithmembers,includedescriptorclasses class * { native <methods>; }
|
|
|
|
|
|
2019-12-16 20:15:20 +08:00
|
|
|
# Keep class's integer static field for MessageUtils to parsing their name.
|
2022-09-29 18:01:49 +09:00
|
|
|
-keepclassmembers class com.android.server.**,android.net.**,com.android.networkstack.** {
|
|
|
|
|
static final % POLICY_*;
|
|
|
|
|
static final % NOTIFY_TYPE_*;
|
|
|
|
|
static final % TRANSPORT_*;
|
|
|
|
|
static final % CMD_*;
|
|
|
|
|
static final % EVENT_*;
|
2019-12-16 20:15:20 +08:00
|
|
|
}
|
|
|
|
|
|
2022-04-19 21:45:04 +00:00
|
|
|
# Ensure runtime-visible field annotations are kept when using R8 full mode.
|
|
|
|
|
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
|
|
|
|
|
-keep interface com.android.networkstack.tethering.util.Struct$Field {
|
|
|
|
|
*;
|
|
|
|
|
}
|
2020-11-12 00:17:15 +08:00
|
|
|
-keepclassmembers public class * extends com.android.networkstack.tethering.util.Struct {
|
2021-04-14 01:30:55 +00:00
|
|
|
*;
|
2020-11-12 00:17:15 +08:00
|
|
|
}
|
|
|
|
|
|
2022-03-03 10:15:09 +08:00
|
|
|
# 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>;
|
2022-09-29 18:01:49 +09:00
|
|
|
}
|