aboutsummaryrefslogtreecommitdiff
path: root/proguard.flags
diff options
context:
space:
mode:
Diffstat (limited to 'proguard.flags')
-rw-r--r--proguard.flags33
1 files changed, 22 insertions, 11 deletions
diff --git a/proguard.flags b/proguard.flags
index 0edd14f3..69b17861 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -27,12 +27,6 @@
-dontwarn com.google.android.volley.**
-dontwarn com.google.android.common.**
-# Keep the methods called from native code.
--keepclasseswithmembers class com.android.tv.tuner.TunerHal {
- int openDvbFrontEndFd();
- int openDvbDemuxFd();
- int openDvbDvrFd();
-}
-keepclasseswithmembers class com.android.tv.tuner.*DataSource {
int readAt(long, byte[], int, int);
long getSize();
@@ -42,10 +36,28 @@
native <methods>;
}
-# Keep method which is used for reflection.
--keep @com.android.tv.common.annotation.UsedByReflection class * {*;}
--keepclasseswithmembers class * {
- @com.android.tv.common.annotation.UsedByReflection <methods>;
+# Configuration of proguard via annotations. Apply them to
+# the elements of your program not only to ensure correct proguard
+# functionality, but to document non-obvious entry points to your code to make
+# it survive refactorings.
+
+# Annotations are implemented as attributes, so we have to explicitly keep them.
+# Catch all which encompasses attributes like RuntimeVisibleParameterAnnotations
+# and RuntimeVisibleTypeAnnotations
+-keepattributes RuntimeVisible*Annotation*
+
+# JNI is an entry point that's hard to keep track of, so there's
+# an annotation to mark fields and methods used by native code.
+
+# Keep the annotations that proguard needs to process.
+-keep class com.android.tv.common.annotation.UsedBy*
+
+# Just because native code accesses members of a class, does not mean that the
+# class itself needs to be annotated - only annotate classes that are
+# referenced themselves in native code.
+-keep @com.android.tv.common.annotation.UsedBy* class *
+-keepclassmembers class * {
+ @com.android.tv.common.annotation.UsedBy* *;
}
# For tests
@@ -56,4 +68,3 @@
# Grpc used by epg via reflection
-keep class io.grpc.internal.DnsNameResolverProvider
-