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

Side by Side Diff: base/android/base_proguard_config.flags

Issue 2269143005: Add a -keep for all Parcelables in hopes it fixes crash in the wild (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 all annotation related attributes that can affect runtime 4 # Keep all annotation related attributes that can affect runtime
5 -keepattributes RuntimeVisible*Annotations 5 -keepattributes RuntimeVisible*Annotations
6 -keepattributes AnnotationDefault 6 -keepattributes AnnotationDefault
7 7
8 # Keep the annotations, because if we don't, the ProGuard rules that use them 8 # Keep the annotations, because if we don't, the ProGuard rules that use them
9 # will not be respected. These classes then show up in our final dex, which we 9 # will not be respected. These classes then show up in our final dex, which we
10 # do not want - see crbug.com/628226. 10 # do not want - see crbug.com/628226.
(...skipping 19 matching lines...) Expand all
30 -keepclasseswithmembers,includedescriptorclasses class * { 30 -keepclasseswithmembers,includedescriptorclasses class * {
31 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; 31 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>;
32 } 32 }
33 -keepclasseswithmembers class * { 33 -keepclasseswithmembers class * {
34 @org.chromium.base.annotations.UsedByReflection <methods>; 34 @org.chromium.base.annotations.UsedByReflection <methods>;
35 } 35 }
36 -keepclasseswithmembers,includedescriptorclasses class * { 36 -keepclasseswithmembers,includedescriptorclasses class * {
37 native <methods>; 37 native <methods>;
38 } 38 }
39 39
40 # Keep all Parcelables as they might be marshalled outside Chrome. 40 # Keep all CREATOR fields within Parcelable that are kept.
41 -keepnames class * implements android.os.Parcelable
42
43 -keepclassmembers class * implements android.os.Parcelable { 41 -keepclassmembers class * implements android.os.Parcelable {
44 public static *** CREATOR; 42 public static *** CREATOR;
45 } 43 }
46 44
45 # Don't obfuscate Parcelables as they might be marshalled outside Chrome.
46 -keepnames class * implements android.os.Parcelable
47
48 # Keep all Parcelables, since Play Services has some that are used only by
49 # reflection.
50 # TODO(agrieve): Remove this once proguard flags provided by play services via
51 # .aars are used.
nyquist 2016/08/24 21:16:12 Nit: Is there a bug for this?
agrieve 2016/08/25 01:00:53 Good call. Added.
52 -keep class * implements android.os.Parcelable
53
47 # Remove methods annotated with this if their return value is unused 54 # Remove methods annotated with this if their return value is unused
48 -assumenosideeffects class ** { 55 -assumenosideeffects class ** {
49 @org.chromium.base.annotations.RemovableInRelease <methods>; 56 @org.chromium.base.annotations.RemovableInRelease <methods>;
50 } 57 }
51 58
52 # Keep all enum values and valueOf methods. See 59 # Keep all enum values and valueOf methods. See
53 # http://proguard.sourceforge.net/index.html#manual/examples.html 60 # http://proguard.sourceforge.net/index.html#manual/examples.html
54 # for the reason for this. Also, see http://crbug.com/248037. 61 # for the reason for this. Also, see http://crbug.com/248037.
55 -keepclassmembers enum * { 62 -keepclassmembers enum * {
56 public static **[] values(); 63 public static **[] values();
57 } 64 }
58 65
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698