OLD | NEW |
1 # As of August 11, 2016, obfuscation was tested and passed on the trybots, | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # saving us 660kb on our .dex size and 53kb memory/process. Enable obfuscation | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # as soon as Crash supports ReTrace's deobfuscation of stack traces. | 3 # found in the LICENSE file. |
4 # | |
5 # To enable obfuscation, remove the -keepnames rule for | |
6 # com.google.android.apps.chrome.** and org.chromium.**, and uncomment the | |
7 # following two lines: | |
8 # -renamesourcefileattribute PG | |
9 # -repackageclasses "" | |
10 | |
11 # Disable obfuscation for the following two packages. | |
12 -keepnames,allowoptimization class com.google.android.apps.chrome.**,org.chromiu
m.** { | |
13 *; | |
14 } | |
15 | 4 |
16 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) | 5 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) |
17 # This can be improved upon - see crbug.com/622023. | 6 # This can be improved upon - see crbug.com/622023. |
18 -keep public class com.google.android.apps.chrome** extends android.app.Fragment | 7 -keep public class com.google.android.apps.chrome** extends android.app.Fragment |
19 -keep public class org.chromium** extends android.app.Fragment | 8 -keep public class org.chromium** extends android.app.Fragment |
20 | 9 |
21 # These classes aren't themselves referenced, but __ProcessService[0,1,2...] are | 10 # These classes aren't themselves referenced, but __ProcessService[0,1,2...] are |
22 # referenced, and we look up these services by appending a number onto the name | 11 # referenced, and we look up these services by appending a number onto the name |
23 # of the base class. Thus, we need to keep the base class name around so that | 12 # of the base class. Thus, we need to keep the base class name around so that |
24 # the child classes can be looked up. | 13 # the child classes can be looked up. |
25 -keep class org.chromium.content.app.SandboxedProcessService | 14 -keep class org.chromium.content.app.SandboxedProcessService |
26 -keep class org.chromium.content.app.PrivilegedProcessService | 15 -keep class org.chromium.content.app.PrivilegedProcessService |
27 | 16 |
28 # TODO(ianwen): remove this config once proguard file inclusion from AAR is supp
orted. | 17 # TODO(ianwen): remove this config once proguard file inclusion from AAR is supp
orted. |
29 # CoordinatorLayout resolves the behaviors of its child components with reflecti
on. | 18 # CoordinatorLayout resolves the behaviors of its child components with reflecti
on. |
30 -keep public class * extends android.support.design.widget.CoordinatorLayout$Beh
avior { | 19 -keep public class * extends android.support.design.widget.CoordinatorLayout$Beh
avior { |
31 public <init>(android.content.Context, android.util.AttributeSet); | 20 public <init>(android.content.Context, android.util.AttributeSet); |
32 public <init>(); | 21 public <init>(); |
33 } | 22 } |
34 | 23 |
35 # SearchView is used in website_preferences_menu.xml and is constructed by | 24 # SearchView is used in website_preferences_menu.xml and is constructed by |
36 # Android using reflection. | 25 # Android using reflection. |
37 -keep class android.support.v7.widget.SearchView { | 26 -keep class android.support.v7.widget.SearchView { |
38 public <init>(...); | 27 public <init>(...); |
39 } | 28 } |
40 | 29 |
41 # Google Play Services warnings are about its resources. | 30 # Google Play Services warnings are about its resources. |
42 -dontwarn com.google.android.gms.R** | 31 -dontwarn com.google.android.gms.R** |
OLD | NEW |