Home | History | Annotate | Download | only in chromium
      1 # Most of the flags in this file are duplicated to refer to both the pre- and
      2 # post-jarjar remapping versions of the class names. This enables the same
      3 # config file to be used whether jarjar is enabled or not.
      4 
      5 
      6 # Keep the factory and its public members; it's the main entry point used by the
      7 # framework.
      8 -keep class com.android.webview.chromium.WebViewChromiumFactoryProvider {
      9     public *;
     10 }
     11 
     12 # Keep the native methods bound to plat_support.
     13 -keepclasseswithmembers class com.android.webview.chromium.** {
     14   native <methods>;
     15 }
     16 
     17 # Keep everything related to the org.chromium JNI interface.
     18 -keepclasseswithmembers class org.chromium.** {
     19   @**.AccessedByNative <fields>;
     20 }
     21 -keepclasseswithmembers class org.chromium.** {
     22   @**.CalledByNative <methods>;
     23 }
     24 -keepclasseswithmembers class org.chromium.** {
     25   @**.CalledByNativeUnchecked <methods>;
     26 }
     27 -keepclasseswithmembers class org.chromium.** {
     28   native <methods>;
     29 }
     30 -keepclasseswithmembers class com.android.org.chromium.** {
     31   @**.AccessedByNative <fields>;
     32 }
     33 -keepclasseswithmembers class com.android.org.chromium.** {
     34   @**.CalledByNative <methods>;
     35 }
     36 -keepclasseswithmembers class com.android.org.chromium.** {
     37   @**.CalledByNativeUnchecked <methods>;
     38 }
     39 -keepclasseswithmembers class com.android.org.chromium.** {
     40   native <methods>;
     41 }
     42 
     43 # Keep methods which get bound to JS interfaces via reflection.
     44 -keepclasseswithmembers class org.chromium.** {
     45   @**.JavascriptInterface <methods>;
     46 }
     47 -keepclasseswithmembers class com.android.org.chromium.** {
     48   @**.JavascriptInterface <methods>;
     49 }
     50 
     51 # Silence notes caused by use of @VisibleForTesting inside guava. This doesn't
     52 # happen when using jarjar because @VisibleForTesting gets renamed as well.
     53 -dontnote com.google.common.cache.LocalCache$ReferenceEntry
     54 -dontnote com.google.common.collect.MapMakerInternalMap$ReferenceEntry
     55 
     56 # MediaPlayerBridge uses reflection to access internal metadata.
     57 -dontnote org.chromium.media.MediaPlayerBridge
     58 -dontnote com.android.org.chromium.media.MediaPlayerBridge
     59 
     60 # AndroidKeyStore uses reflection to access internal OpenSSL state.
     61 -dontnote org.chromium.net.AndroidKeyStore
     62 -dontnote com.android.org.chromium.net.AndroidKeyStore
     63 
     64 # TraceEvent uses reflection to access internal trace info.
     65 -dontnote org.chromium.content.common.TraceEvent
     66 -dontnote com.android.org.chromium.content.common.TraceEvent
     67 
     68 # We need to keep these explicitly as they are parameters to methods which
     69 # are entry points via @calledByNative.
     70 -keep class com.android.org.chromium.ui.autofill.AutofillSuggestion
     71 -keep class com.android.org.chromium.content.browser.ContentVideoViewClient
     72 
     73 # Keep finalizer stuff from google-common used via reflection
     74 -keepclassmembers class com.google.common.** {
     75   *** finalizeReferent();
     76 }
     77 -keepclassmembers class com.google.common.** {
     78   *** startFinalizer(java.lang.Class,java.lang.Object);
     79 }
     80 -keepclassmembers class com.android.org.chromium.com.google.common.** {
     81   *** finalizeReferent();
     82 }
     83 -keepclassmembers class com.android.org.chromium.com.google.common.** {
     84   *** startFinalizer(java.lang.Class,java.lang.Object);
     85 }
     86