[fenix] For https://github.com/mozilla-mobile/fenix/issues/8949 - Removes old motionl...
[gecko.git] / mobile / android / fenix / app / proguard-rules.pro
blob6ca59c4d9e1d728bf622a3e92e45a15f108a4f0d
1 -dontobfuscate
3 ####################################################################################################
4 # Sentry
5 ####################################################################################################
7 # Recommended config via https://docs.sentry.io/clients/java/modules/android/#manual-integration
8 # Since we don't obfuscate, we don't need to use their Gradle plugin to upload ProGuard mappings.
9 -keepattributes LineNumberTable,SourceFile
10 -dontwarn org.slf4j.**
11 -dontwarn javax.**
13 # Our addition: this class is saved to disk via Serializable, which ProGuard doesn't like.
14 # If we exclude this, upload silently fails (Sentry swallows a NPE so we don't crash).
15 # I filed https://github.com/getsentry/sentry-java/issues/572
17 # If Sentry ever mysteriously stops working after we upgrade it, this could be why.
18 -keep class io.sentry.event.Event { *; }
20 ####################################################################################################
21 # Android and GeckoView built-ins
22 ####################################################################################################
24 -dontwarn android.**
25 -dontwarn androidx.**
26 -dontwarn com.google.**
27 -dontwarn org.mozilla.geckoview.**
29 # Raptor now writes a *-config.yaml file to specify Gecko runtime settings (e.g. the profile dir). This
30 # file gets deserialized into a DebugConfig object, which is why we need to keep this class
31 # and its members.
32 -keep class org.mozilla.gecko.util.DebugConfig { *; }
34 ####################################################################################################
35 # Force removal of slow Dispatchers.Main ServiceLoader
36 ####################################################################################################
37 # Allow R8 to optimize away the FastServiceLoader.
38 # Together with ServiceLoader optimization in R8
39 # this results in direct instantiation when loading Dispatchers.Main
40 -assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
41 boolean FAST_SERVICE_LOADER_ENABLED return false;
44 -assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoader {
45 boolean ANDROID_DETECTED return true;
48 ####################################################################################################
49 # Mozilla Application Services
50 ####################################################################################################
52 -keep class mozilla.appservices.** { *; }
54 ####################################################################################################
55 # ViewModels
56 ####################################################################################################
58 -keep class org.mozilla.fenix.**ViewModel { *; }
60 ####################################################################################################
61 # Adjust
62 ####################################################################################################
64 -keep public class com.adjust.sdk.** { *; }
65 -keep class com.google.android.gms.common.ConnectionResult {
66 int SUCCESS;
68 -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
69 com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
71 -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
72 java.lang.String getId();
73 boolean isLimitAdTrackingEnabled();
75 -keep public class com.android.installreferrer.** { *; }
76 -keep class dalvik.system.VMRuntime {
77 java.lang.String getRuntime();
79 -keep class android.os.Build {
80 java.lang.String[] SUPPORTED_ABIS;
81 java.lang.String CPU_ABI;
83 -keep class android.content.res.Configuration {
84 android.os.LocaledList getLocales();
85 java.util.Locale locale;
87 -keep class android.os.LocaleList {
88 java.util.Locale get(int);
91 # Keep code generated from Glean Metrics
92 -keep class org.mozilla.fenix.GleanMetrics.** { *; }
94 # Keep motionlayout internal methods
95 # https://github.com/mozilla-mobile/fenix/issues/2094
96 -keep class androidx.constraintlayout.** { *; }
98 # Keep adjust relevant classes
99 -keep class com.adjust.sdk.** { *; }
100 -keep class com.google.android.gms.common.ConnectionResult {
101 int SUCCESS;
103 -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
104 com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
106 -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
107 java.lang.String getId();
108 boolean isLimitAdTrackingEnabled();
110 -keep public class com.android.installreferrer.** { *; }
112 # Keep Android Lifecycle methods
113 # https://bugzilla.mozilla.org/show_bug.cgi?id=1596302
114 -keep class androidx.lifecycle.** { *; }