Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3361)

Unified Diff: chrome/android/java/proguard.flags

Issue 2079613002: Revamping -keeps for @annotations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing comments in flags file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/banners/AppDetailsDelegate.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/proguard.flags
diff --git a/chrome/android/java/proguard.flags b/chrome/android/java/proguard.flags
index 1b2aed8749fb46eb1e46ec04a657560806f37177..d0f19e3e4293f77be6fc3cb6340668a511961e39 100644
--- a/chrome/android/java/proguard.flags
+++ b/chrome/android/java/proguard.flags
@@ -15,15 +15,62 @@
!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 crbug.com/622023.
+-keep public class com.google.android.apps.chrome** extends android.app.Fragment
+-keep public class org.chromium** extends android.app.Fragment
+
+# Keeps for class level annotations.
+-keep @**.UsedByReflection class *
+-keep @**.VisibleForTesting class *
+
+# Keeps for method level annotations.
+-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>;
- @**.VisibleForTesting *;
+}
+-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>;
+}
+-keepclasseswithmembers class org.chromium.** {
+ @**.CalledByNativeUnchecked <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
+ @**.JavascriptInterface <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
+ @**.NativeCall <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
+ @**.UsedByReflection <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
+ @**.VisibleForTesting <methods>;
+}
+-keepclasseswithmembers class org.chromium.** {
native <methods>;
}
@@ -172,3 +219,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.* { *; }
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/banners/AppDetailsDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698