aboutsummaryrefslogtreecommitdiff
path: root/proguard.flags
diff options
context:
space:
mode:
authorLive Channels Team <no-reply@google.com>2018-01-11 20:42:01 -0800
committerNick Chalko <nchalko@google.com>2018-01-16 11:04:29 -0800
commit4a5144ac8c51c4d89d1359e13e37fcd7f928ed9a (patch)
tree9137148fbca9b8cb1b35c4553efc921e5027ffda /proguard.flags
parente0fd52bbc36ec38397cdac345e42dd23ab093899 (diff)
downloadTV-4a5144ac8c51c4d89d1359e13e37fcd7f928ed9a.tar.gz
Project import generated by Copybara.
PiperOrigin-RevId: 181700159 Change-Id: I7bae213f26b690c0d76189c08abd85d7f7b304a3
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
-