# Proguard config for apps that depend on cronet_shared_java.jar (which should
# be all apps that depend on any part of Cronet)

# Part of the Android System SDK, so ProGuard won't be able to resolve it if
# running against the standard SDK.
-dontwarn android.util.StatsEvent
-dontwarn android.util.StatsEvent$*
# There is also an undefined reference to android.util.StatsLog.write(), which
# R8 appears to be fine with but other processors (e.g. internal Google
# ProGuard) may not be. See b/315269496.
-dontwarn android.util.StatsLog

# These annotations are only used by the jni_zero code generator, and are not
# needed at runtime. There are cases where we can end up shipping classes that
# have @CalledByNative methods, but we don't ship jni_zero because there is no
# native code; for example, CronetMetrics when called by the Java/fallback
# Cronet impl (as opposed to the native impl). See also
# https://crbug.com/445372626.
-dontwarn org.jni_zero.CalledByNative
-dontwarn org.jni_zero.JNINamespace

# Sadly missing from //third_party/android_deps:protobuf_lite_runtime_java. See
# https://crbug.com/40704600.
# Note: this won't affect the user's protobuf because we rename our protobuf
# classes before shipping them (and these rules are automatically renamed too).
# See _cronet_repackage_rules in BUILD.gn.
-dontwarn com.google.protobuf.Any
-dontwarn com.google.protobuf.Any$Builder
