# 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 we'd like all Chromium .apks to use.

# Keep line number information, useful for stack traces.
-keepattributes SourceFile,LineNumberTable

# Enable protobuf-related optimizations.
-shrinkunusedprotofields

# Allowing Proguard to change modifiers.
-allowaccessmodification

# Keep all CREATOR fields within Parcelable that are kept.
-keepclassmembers class * implements android.os.Parcelable {
  public static *** CREATOR;
}

# Keep all default constructors for used Fragments. Required since they are
# called reflectively when fragments are reinflated after the app is killed.
-keepclassmembers class * extends android.app.Fragment {
  public <init>();
}
-keepclassmembers class * extends androidx.fragment.app.Fragment {
  public <init>();
}

# AndroidX classes that are inflated via reflection.
-keep public class androidx.preference.Preference {
    public <init>(android.content.Context, android.util.AttributeSet);
}
-keep public class androidx.preference.PreferenceScreen {
    public <init>(android.content.Context, android.util.AttributeSet);
}
-keep public class androidx.preference.PreferenceCategory {
    public <init>(android.content.Context, android.util.AttributeSet);
}
-keep public class androidx.preference.ListPreference {
    public <init>(android.content.Context, android.util.AttributeSet);
}

# SearchView is used in website_preferences_menu.xml and is constructed by
# Android using reflection.
-keep class androidx.appcompat.widget.SearchView {
  public <init>(...);
}

# Referenced by androidx.preference.PreferenceInflater.
-keep public class androidx.preference.SwitchPreference {}

# 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 class * 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 * {
    public static **[] values();
}

# This is to workaround crbug.com/1204690 - an old GMS app version crashes when
# ObjectWrapper contains > 1 fields, and this prevents R8 from inserting a
# synthetic field.
-keep,allowaccessmodification class com.google.android.gms.dynamic.ObjectWrapper {
  <fields>;
}

# Remove calls to String.format() where the result goes unused. This can mask
# exceptions if the parameters to String.format() are invalid, but such cases
# are generally programming bugs anyways.
# Not using the return value generally occurs due to logging being stripped.
-assumenosideeffects class java.lang.String {
  static java.lang.String format(...);
}

# Allows R8 to remove static field accesses to library APIs when the results
# are unused (E.g. tell it that it's okay to not trigger <clinit>).
# Not using the return value generally occurs due to logging being stripped.
-assumenosideeffects class android.**, java.** {
  static <fields>;
}
