Chromium Code Reviews| Index: chrome/android/java/proguard.flags |
| diff --git a/chrome/android/java/proguard.flags b/chrome/android/java/proguard.flags |
| index 1b2aed8749fb46eb1e46ec04a657560806f37177..9edf6874cb084735f1daaeb49be0dc1b657e3f12 100644 |
| --- a/chrome/android/java/proguard.flags |
| +++ b/chrome/android/java/proguard.flags |
| @@ -15,18 +15,66 @@ |
| !private static final java.lang.String *; |
| } |
| -# Keep code annotated with the following annotations. |
| --keep class com.google.android.apps.chrome.**,org.chromium.** { |
| +# Fragments are loaded using reflection via Fragment.instantiate(Context,String) |
| +# This can be improved upon - see b/622023. |
|
agrieve
2016/06/22 18:08:06
nit: Please use either crbug/622023, or http://crb
smaier
2016/06/22 18:24:06
Done.
|
| +-keep public class com.google.android.apps.chrome** extends android.app.Fragment |
| +-keep public class org.chromium** extends android.app.Fragment |
| + |
| +# This block will keep all members that are annotated to be kept. |
|
agrieve
2016/06/22 18:08:06
nit: this -> these, can you also elaborate to expl
smaier
2016/06/22 18:24:06
Discussed offline about these comments.
|
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.AccessedByNative <fields>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.CalledByNative <methods>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.CalledByNativeUnchecked <methods>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.JavascriptInterface <methods>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.NativeCall <methods>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.UsedByReflection <methods>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + @**.VisibleForTesting <methods>; |
| +} |
| +-keepclasseswithmembers class com.google.android.apps.chrome.** { |
| + native <methods>; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| @**.AccessedByNative <fields>; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| @**.CalledByNative <methods>; |
|
agrieve
2016/06/22 18:08:06
I think we'd need a -keep for the ByNative ones as
|
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| @**.CalledByNativeUnchecked <methods>; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| @**.JavascriptInterface <methods>; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| @**.NativeCall <methods>; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| @**.UsedByReflection <methods>; |
| - @**.VisibleForTesting *; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| + @**.VisibleForTesting <methods>; |
| +} |
| +-keepclasseswithmembers class org.chromium.** { |
| native <methods>; |
| } |
| +# Keeping classes which are annotated to be kept |
| +-keep @**.UsedByReflection class * |
| +-keep @**.VisibleForTesting class * |
| + |
| + |
| # Class merging provides negligible .dex size reduction and method count |
| # reduction (about 0.3% improvement on method count, and 0.1% savings on size), |
| # and it messes up stack traces if the classes are optimized. Thus, it is in our |
| @@ -172,3 +220,7 @@ |
| -keepnames class com.google.android.gms.common.GoogleApiAvailability { |
| *; |
| } |
| + |
| +# Needed for chrome_sync_shell_test_apk. Note - these do no affect chrome_apk's |
| +# size. |
| +-keep class org.chromium.sync.protocol.* { *; } |