proguard.flags revision 0657a5e0b853cb639b1b5a5a195125f9d6221a11
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 com.android.org.chromium.** {
19  @**.AccessedByNative <fields>;
20}
21-keepclasseswithmembers class com.android.org.chromium.** {
22  @**.CalledByNative <methods>;
23}
24-keepclasseswithmembers class com.android.org.chromium.** {
25  @**.CalledByNativeUnchecked <methods>;
26}
27-keepclasseswithmembers class com.android.org.chromium.** {
28  native <methods>;
29}
30
31# Keep methods which get bound to JS interfaces via reflection.
32-keepclasseswithmembers class com.android.org.chromium.** {
33  @**.JavascriptInterface <methods>;
34}
35
36# Silence notes caused by use of @VisibleForTesting inside guava. This doesn't
37# happen when using jarjar because @VisibleForTesting gets renamed as well.
38-dontnote com.google.common.annotations.VisibleForTesting
39
40# MediaPlayerBridge uses reflection to access internal metadata.
41-dontnote com.android.org.chromium.media.MediaPlayerBridge
42
43# AndroidKeyStore uses reflection to access internal OpenSSL state.
44-dontnote com.android.org.chromium.net.AndroidKeyStore
45
46# TraceEvent uses reflection to access internal trace info.
47-dontnote com.android.org.chromium.content.common.TraceEvent
48
49# ProxyChangeListener$ProxyReceiver uses reflection to access internal
50# android.net.ProxyProperties.
51-dontnote com.android.org.chromium.net.ProxyChangeListener$ProxyReceiver
52
53# com.android.org.chromium.content.app.Linker dynamically casts to $TestRunner
54# when running tests. We don't run these tests in WebView.
55-dontnote com.android.org.chromium.content.app.Linker$TestRunner
56
57# We need to keep these explicitly as they are parameters to methods which
58# are entry points via @calledByNative.
59-keep class com.android.org.chromium.ui.autofill.AutofillSuggestion
60-keep class com.android.org.chromium.content.browser.ContentVideoViewClient
61-keep class com.android.org.chromium.ui.ColorSuggestion
62-keep class com.android.org.chromium.content.browser.input.DateTimeSuggestion
63-keep class com.android.org.chromium.content.browser.ContentViewCore$JavaScriptCallback
64-keep class com.android.org.chromium.content_public.browser.NavigationController
65
66# Keep these classes as they are parameters to methods that are native entry points.
67-keep class com.android.org.chromium.android_webview.AwBrowserContext
68-keep class com.android.org.chromium.base.library_loader.Linker$LibInfo
69
70# Keep finalizer stuff from google-common used via reflection
71-keepclassmembers class com.android.org.chromium.com.google.common.** {
72  *** finalizeReferent();
73}
74-keepclassmembers class com.android.org.chromium.com.google.common.** {
75  *** startFinalizer(java.lang.Class,java.lang.Object);
76}
77
78# We need to explicitly keep classes and constructors referenced only in
79# layout resources.
80-keep class com.android.org.chromium.ui.ColorPickerAdvanced {
81  <init>(...);
82}
83
84-keep class com.android.org.chromium.ui.ColorPickerSimple {
85  <init>(...);
86}
87
88-keep class com.android.org.chromium.ui.ColorPickerMoreButton {
89  <init>(...);
90}
91