blob: cf546d1ba7ebc350d2eac18eebae58716d6d46b8 [file] [log] [blame]
# Disable obfuscation for the following two packages.
-keepnames,allowoptimization class com.google.android.apps.chrome.**,org.chromium.** {
*;
}
# Fragments are loaded using reflection via Fragment.instantiate(Context,String)
# This can be improved upon - see crbug.com/622023.
-keep public class com.google.android.apps.chrome** extends android.app.Fragment
-keep public class org.chromium** extends android.app.Fragment
# Keep protobuf code used via reflection
# TODO(tonyg): Removing these -keeps results in new notes, but nothing seems to
# break. This exclusion costs almost 100k of dex size so consider replacing it
# with a -dontnote after more testing.
-keep class com.google.protobuf.** {
*** newBuilder();
*** parseFrom(java.io.InputStream);
}
# Keep the client interfaces for cacheinvalidation as they are used as
# argument types for some of our code that we're keeping and proguard warns
# otherwise.
-keep class com.google.ipc.invalidation.external.client.** {
*;
}
# Keep all Parcelables as they might be marshalled outside Chrome.
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
# SearchView is used in website_preferences_menu.xml and is constructed by
# Android using reflection.
-keep class android.support.v7.widget.SearchView {
public <init>(...);
}
# Google Play Services warnings are about its resources.
-dontwarn com.google.android.gms.R**
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
# Proguard mistakenly optimizes away some null checks on final fields
# in the support library.
# See https://sourceforge.net/p/proguard/bugs/531/#fdc9/41e2
-keepclassmembers,allowshrinking,allowobfuscation class android.support.v7.widget.AppCompatButton {
!static final <fields>;
}