OLD | NEW |
1 # Keep line number information, useful for stack traces. | 1 # Keep line number information, useful for stack traces. |
2 -keepattributes SourceFile,LineNumberTable | 2 -keepattributes SourceFile,LineNumberTable |
3 | 3 |
4 # Keep the annotations. | 4 # Keep the annotations. |
5 -keep @interface *** | 5 -keep @interface *** |
6 | 6 |
7 # Disable obfuscation for the following two packages. | 7 # Disable obfuscation for the following two packages. |
8 -keepnames class com.google.android.apps.chrome.**,org.chromium.** { | 8 -keepnames class com.google.android.apps.chrome.**,org.chromium.** { |
9 *; | 9 *; |
10 } | 10 } |
11 | 11 |
12 # Keep all the primitive and String constants for for the following two packages
. | 12 # Keep all the primitive and String constants for for the following two packages
. |
13 -keepclassmembers class com.google.android.apps.chrome.**,org.chromium.** { | 13 -keepclassmembers class com.google.android.apps.chrome.**,org.chromium.** { |
14 !private static final % *; | 14 !private static final % *; |
15 !private static final java.lang.String *; | 15 !private static final java.lang.String *; |
16 } | 16 } |
17 | 17 |
18 # Keep code annotated with the following annotations. | 18 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) |
19 -keep class com.google.android.apps.chrome.**,org.chromium.** { | 19 # This can be improved upon - see crbug.com/622023. |
| 20 -keep public class com.google.android.apps.chrome** extends android.app.Fragment |
| 21 -keep public class org.chromium** extends android.app.Fragment |
| 22 |
| 23 # Keeps for class level annotations. |
| 24 -keep @**.UsedByReflection class * |
| 25 -keep @**.VisibleForTesting class * |
| 26 |
| 27 # Keeps for method level annotations. |
| 28 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
20 @**.AccessedByNative <fields>; | 29 @**.AccessedByNative <fields>; |
| 30 } |
| 31 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
21 @**.CalledByNative <methods>; | 32 @**.CalledByNative <methods>; |
| 33 } |
| 34 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
22 @**.CalledByNativeUnchecked <methods>; | 35 @**.CalledByNativeUnchecked <methods>; |
| 36 } |
| 37 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
23 @**.JavascriptInterface <methods>; | 38 @**.JavascriptInterface <methods>; |
| 39 } |
| 40 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
24 @**.NativeCall <methods>; | 41 @**.NativeCall <methods>; |
| 42 } |
| 43 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
25 @**.UsedByReflection <methods>; | 44 @**.UsedByReflection <methods>; |
26 @**.VisibleForTesting *; | 45 } |
| 46 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 47 @**.VisibleForTesting <methods>; |
| 48 } |
| 49 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 50 native <methods>; |
| 51 } |
| 52 -keepclasseswithmembers class org.chromium.** { |
| 53 @**.AccessedByNative <fields>; |
| 54 } |
| 55 -keepclasseswithmembers class org.chromium.** { |
| 56 @**.CalledByNative <methods>; |
| 57 } |
| 58 -keepclasseswithmembers class org.chromium.** { |
| 59 @**.CalledByNativeUnchecked <methods>; |
| 60 } |
| 61 -keepclasseswithmembers class org.chromium.** { |
| 62 @**.JavascriptInterface <methods>; |
| 63 } |
| 64 -keepclasseswithmembers class org.chromium.** { |
| 65 @**.NativeCall <methods>; |
| 66 } |
| 67 -keepclasseswithmembers class org.chromium.** { |
| 68 @**.UsedByReflection <methods>; |
| 69 } |
| 70 -keepclasseswithmembers class org.chromium.** { |
| 71 @**.VisibleForTesting <methods>; |
| 72 } |
| 73 -keepclasseswithmembers class org.chromium.** { |
27 native <methods>; | 74 native <methods>; |
28 } | 75 } |
29 | 76 |
30 # Class merging provides negligible .dex size reduction and method count | 77 # Class merging provides negligible .dex size reduction and method count |
31 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), | 78 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), |
32 # and it messes up stack traces if the classes are optimized. Thus, it is in our | 79 # and it messes up stack traces if the classes are optimized. Thus, it is in our |
33 # best interests to turn it off. See crbug.com/620323 | 80 # best interests to turn it off. See crbug.com/620323 |
34 -optimizations !class/merging/* | 81 -optimizations !class/merging/* |
35 | 82 |
36 # Keep all runtime visible annotations | 83 # Keep all runtime visible annotations |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 *; | 212 *; |
166 } | 213 } |
167 | 214 |
168 # TODO(yfriedman): Remove when crbug.com/488192 is fixed. | 215 # TODO(yfriedman): Remove when crbug.com/488192 is fixed. |
169 -dontwarn org.apache.http.conn.scheme.LayeredSocketFactory | 216 -dontwarn org.apache.http.conn.scheme.LayeredSocketFactory |
170 | 217 |
171 # Needed to run ChromeTest.apk | 218 # Needed to run ChromeTest.apk |
172 -keepnames class com.google.android.gms.common.GoogleApiAvailability { | 219 -keepnames class com.google.android.gms.common.GoogleApiAvailability { |
173 *; | 220 *; |
174 } | 221 } |
| 222 |
| 223 # Needed for chrome_sync_shell_test_apk. Note - these do no affect chrome_apk's |
| 224 # size. |
| 225 -keep class org.chromium.sync.protocol.* { *; } |
OLD | NEW |