57 lines
2.2 KiB
Plaintext
57 lines
2.2 KiB
Plaintext
|
|
# 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.
|
||
|
|
|
||
|
|
-keep @androidx.annotation.Keep class *
|
||
|
|
-keepclasseswithmembers,allowaccessmodification class * {
|
||
|
|
@androidx.annotation.Keep <fields>;
|
||
|
|
}
|
||
|
|
-keepclasseswithmembers,allowaccessmodification class * {
|
||
|
|
@androidx.annotation.Keep <methods>;
|
||
|
|
}
|
||
|
|
|
||
|
|
# Allow unused native methods to be removed, but prevent renaming on those that are kept.
|
||
|
|
-keepclasseswithmembernames,includedescriptorclasses,allowaccessmodification class ** {
|
||
|
|
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 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 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 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 * extends <1> {
|
||
|
|
<init>();
|
||
|
|
}
|
||
|
|
|
||
|
|
# TODO(agrieve): Remove once we start to use Android U SDK.
|
||
|
|
-dontwarn android.window.BackEvent
|
||
|
|
-dontwarn android.window.OnBackAnimationCallback
|