| # Copyright 2016 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Contains flags that can be safely shared with Cronet, and thus would be |
| # appropriate for third-party apps to include. |
| |
| # Allow unused native methods to be removed, but prevent renaming on those that are kept. |
| -keepclasseswithmembernames,includedescriptorclasses,allowaccessmodification class !cr_allowunused,** { |
| native <methods>; |
| } |
| |
| # Use assumevalues block instead of assumenosideeffects block because Google3 proguard cannot parse |
| # assumenosideeffects blocks which overwrite return value. |
| # chromium_code.flags rather than remove_logging.flags so that it's included |
| # in cronet. |
| -assumevalues class org.chromium.base.Log { |
| static boolean isDebug() return false; |
| } |
| |
| # Keep all CREATOR fields within Parcelable that are kept. |
| -keepclassmembers class !cr_allowunused,org.chromium.** implements android.os.Parcelable { |
| public static *** CREATOR; |
| } |
| |
| # Don't obfuscate Parcelables as they might be marshalled outside Chrome. |
| # If we annotated all Parcelables that get put into Bundles other than |
| # for saveInstanceState (e.g. PendingIntents), then we could actually keep the |
| # names of just those ones. For now, we'll just keep them all. |
| -keepnames,allowaccessmodification class !cr_allowunused,org.chromium.** implements android.os.Parcelable {} |
| |
| # Keep all enum values and valueOf methods. See |
| # http://proguard.sourceforge.net/index.html#manual/examples.html |
| # for the reason for this. Also, see http://crbug.com/248037. |
| -keepclassmembers enum !cr_allowunused,org.chromium.** { |
| public static **[] values(); |
| } |
| |
| # -identifiernamestring doesn't keep the module impl around, we have to |
| # explicitly keep it. |
| -if @org.chromium.components.module_installer.builder.ModuleInterface interface * |
| -keep,allowobfuscation,allowaccessmodification class !cr_allowunused,** extends <1> { |
| <init>(); |
| } |
| |
| # Required to remove fields until b/274802355 is resolved. |
| -assumevalues class !cr_allowunused,** { |
| final org.chromium.base.ThreadUtils$ThreadChecker * return _NONNULL_; |
| } |
| |
| # TODO(agrieve): Remove once we start to use Android U SDK. |
| -dontwarn android.window.BackEvent |
| -dontwarn android.window.OnBackAnimationCallback |