1# Copyright 2016 The Chromium Authors 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 can be safely shared with Cronet, and thus would be 6# appropriate for third-party apps to include. 7 8# Allow unused native methods to be removed, but prevent renaming on those that are kept. 9-keepclasseswithmembernames,includedescriptorclasses,allowaccessmodification class !cr_allowunused,** { 10 native <methods>; 11} 12 13# Use assumevalues block instead of assumenosideeffects block because Google3 proguard cannot parse 14# assumenosideeffects blocks which overwrite return value. 15# chromium_code.flags rather than remove_logging.flags so that it's included 16# in cronet. 17-assumevalues class org.chromium.base.Log { 18 static boolean isDebug() return false; 19} 20 21# Keep all CREATOR fields within Parcelable that are kept. 22-keepclassmembers class !cr_allowunused,org.chromium.** implements android.os.Parcelable { 23 public static *** CREATOR; 24} 25 26# Don't obfuscate Parcelables as they might be marshalled outside Chrome. 27# If we annotated all Parcelables that get put into Bundles other than 28# for saveInstanceState (e.g. PendingIntents), then we could actually keep the 29# names of just those ones. For now, we'll just keep them all. 30-keepnames,allowaccessmodification class !cr_allowunused,org.chromium.** implements android.os.Parcelable {} 31 32# Keep all enum values and valueOf methods. See 33# http://proguard.sourceforge.net/index.html#manual/examples.html 34# for the reason for this. Also, see http://crbug.com/248037. 35-keepclassmembers enum !cr_allowunused,org.chromium.** { 36 public static **[] values(); 37} 38 39# -identifiernamestring doesn't keep the module impl around, we have to 40# explicitly keep it. 41-if @org.chromium.components.module_installer.builder.ModuleInterface interface * 42-keep,allowobfuscation,allowaccessmodification class !cr_allowunused,** extends <1> { 43 <init>(); 44} 45 46# Required to remove fields until b/274802355 is resolved. 47-assumevalues class !cr_allowunused,** { 48 final org.chromium.base.ThreadUtils$ThreadChecker * return _NONNULL_; 49} 50 51# TODO(agrieve): Remove once we start to use Android U SDK. 52-dontwarn android.window.BackEvent 53-dontwarn android.window.OnBackAnimationCallback 54