| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Contains flags that we'd like all Chromium .apks to use. |
| 6 |
| 7 # Keep line number information, useful for stack traces. |
| 8 -keepattributes SourceFile,LineNumberTable |
| 9 |
| 10 # Keep all CREATOR fields within Parcelable that are kept. |
| 11 -keepclassmembers class * implements android.os.Parcelable { |
| 12 public static *** CREATOR; |
| 13 } |
| 14 |
| 15 # Don't obfuscate Parcelables as they might be marshalled outside Chrome. |
| 16 # If we annotated all Parcelables that get put into Bundles other than |
| 17 # for saveInstanceState (e.g. PendingIntents), then we could actually keep the |
| 18 # names of just those ones. For now, we'll just keep them all. |
| 19 -keepnames class * implements android.os.Parcelable |
| 20 |
| 21 # Keep all enum values and valueOf methods. See |
| 22 # http://proguard.sourceforge.net/index.html#manual/examples.html |
| 23 # for the reason for this. Also, see http://crbug.com/248037. |
| 24 -keepclassmembers enum * { |
| 25 public static **[] values(); |
| 26 } |
| 27 |
| 1 # Allows Proguard freedom in removing these log related calls. We ask for debug | 28 # Allows Proguard freedom in removing these log related calls. We ask for debug |
| 2 # and verbose logs to be stripped out in base.Log, so we are just ensuring we | 29 # and verbose logs to be stripped out in base.Log, so we are just ensuring we |
| 3 # get rid of all other debug/verbose logs. | 30 # get rid of all other debug/verbose logs. |
| 4 -assumenosideeffects class android.util.Log { | 31 -assumenosideeffects class android.util.Log { |
| 5 static *** d(...); | 32 static *** d(...); |
| 6 static *** v(...); | 33 static *** v(...); |
| 7 static *** isLoggable(...); | 34 static *** isLoggable(...); |
| 8 } | 35 } |
| 9 | 36 |
| 10 # The following chart was created on July 20, 2016, to decide on 3 optimization | 37 # The following chart was created on July 20, 2016, to decide on 3 optimization |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 -optimizations !class/merging/* | 50 -optimizations !class/merging/* |
| 24 | 51 |
| 25 # Allowing Proguard to change modifiers. This change shrinks the .dex size by | 52 # Allowing Proguard to change modifiers. This change shrinks the .dex size by |
| 26 # ~1%, and reduces the method count by ~4%. | 53 # ~1%, and reduces the method count by ~4%. |
| 27 -allowaccessmodification | 54 -allowaccessmodification |
| 28 | 55 |
| 29 # The support library contains references to newer platform versions. | 56 # The support library contains references to newer platform versions. |
| 30 # Don't warn about those in case this app is linking against an older | 57 # Don't warn about those in case this app is linking against an older |
| 31 # platform version. We know about them, and they are safe. | 58 # platform version. We know about them, and they are safe. |
| 32 -dontwarn android.support.** | 59 -dontwarn android.support.** |
| OLD | NEW |