forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonochrome_public_bundle.proguard_flags.expected
More file actions
1001 lines (844 loc) · 40 KB
/
Copy pathmonochrome_public_bundle.proguard_flags.expected
File metadata and controls
1001 lines (844 loc) · 40 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# File: ../../third_party/androidx/androidx_annotations.flags
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-keep @androidx.annotation.Keep class *
-keepclasseswithmembers,allowaccessmodification class * {
@androidx.annotation.Keep <fields>;
}
-keepclasseswithmembers,allowaccessmodification class * {
@androidx.annotation.Keep <methods>;
}
# File: ../../third_party/androidx/androidx_fragment.flags
# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Help R8 to remove debug related coded. All of these static constants are
# initialized to: Log.isLoggable(DEBUG, TAG).
-assumevalues class androidx.fragment.** {
static boolean DEBUG return false;
}
-assumenosideeffects class androidx.fragment.app.FragmentManager {
static boolean isLoggingEnabled(...) return false;
}
# File: ../../third_party/androidx/androidx_mediarouter.flags
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Help R8 determine that we don't use MediaRouteDynamicChooserDialog.
# https://crbug.com/1147188
-assumevalues class ** {
boolean mUseDynamicGroup return false;
}
# File: ../../third_party/androidx/androidx_preferences.flags
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# AndroidX classes that are inflated via reflection.
-keep public class androidx.preference.ListPreference {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keep public class androidx.preference.Preference {
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.PreferenceScreen {
public <init>(android.content.Context, android.util.AttributeSet);
}
# Referenced by androidx.preference.PreferenceInflater.
-keep public class androidx.preference.SwitchPreference {}
# File: ../../build/android/chromium_annotations.flags
# Copyright 2022 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 related to annotations in //build/android that can be safely
# shared with Cronet, and thus would be appropriate for third-party apps to
# include.
# Keep all annotation related attributes that can affect runtime
-keepattributes RuntimeVisible*Annotations
-keepattributes AnnotationDefault
# Keep the annotations, because if we don't, the ProGuard rules that use them
# will not be respected. These classes then show up in our final dex, which we
# do not want - see crbug.com/628226.
-keep @interface org.chromium.base.annotations.AccessedByNative
-keep @interface org.chromium.base.annotations.CalledByNative
-keep @interface org.chromium.base.annotations.CalledByNativeUnchecked
-keep @interface org.chromium.build.annotations.DoNotInline
-keep @interface org.chromium.build.annotations.UsedByReflection
-keep @interface org.chromium.build.annotations.IdentifierNameString
# Keeps for class level annotations.
-keep,allowaccessmodification @org.chromium.build.annotations.UsedByReflection class ** {}
# Keeps for method level annotations.
-keepclasseswithmembers,allowaccessmodification class ** {
@org.chromium.base.annotations.AccessedByNative <fields>;
}
-keepclasseswithmembers,includedescriptorclasses,allowaccessmodification class ** {
@org.chromium.base.annotations.CalledByNative <methods>;
}
-keepclasseswithmembers,includedescriptorclasses,allowaccessmodification class ** {
@org.chromium.base.annotations.CalledByNativeUnchecked <methods>;
}
-keepclasseswithmembers,allowaccessmodification class ** {
@org.chromium.build.annotations.UsedByReflection <methods>;
}
-keepclasseswithmembers,allowaccessmodification class ** {
@org.chromium.build.annotations.UsedByReflection <fields>;
}
# Never inline classes, methods, or fields with this annotation, but allow
# shrinking and obfuscation.
# Relevant to fields when they are needed to store strong references to objects
# that are held as weak references by native code.
-if @org.chromium.build.annotations.DoNotInline class * {
*** *(...);
}
-keep,allowobfuscation,allowaccessmodification class <1> {
*** <2>(...);
}
-keepclassmembers,allowobfuscation,allowaccessmodification class * {
@org.chromium.build.annotations.DoNotInline <methods>;
}
-keepclassmembers,allowobfuscation,allowaccessmodification class * {
@org.chromium.build.annotations.DoNotInline <fields>;
}
-alwaysinline class * {
@org.chromium.build.annotations.AlwaysInline *;
}
# Keep all logs (Log.VERBOSE = 2). R8 does not allow setting to 0.
-maximumremovedandroidloglevel 1 class ** {
@org.chromium.build.annotations.DoNotStripLogs <methods>;
}
-maximumremovedandroidloglevel 1 @org.chromium.build.annotations.DoNotStripLogs class ** {
<methods>;
}
# Never merge classes horizontally or vertically with this annotation.
# Relevant to classes being used as a key in maps or sets.
-keep,allowaccessmodification,allowobfuscation,allowshrinking @org.chromium.build.annotations.DoNotClassMerge class *
# Mark members annotated with IdentifierNameString as identifier name strings
-identifiernamestring class * {
@org.chromium.build.annotations.IdentifierNameString *;
}
# File: ../../base/android/proguard/chromium_apk.flags
# 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 !cr_allowunused,** 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 class !cr_allowunused,** implements android.os.Parcelable {}
# Keep all default constructors for used Fragments. Required since they are
# called reflectively when fragments are reinflated after the app is killed.
-keepclassmembers class !cr_allowunused,** extends android.app.Fragment {
public <init>();
}
-keepclassmembers class !cr_allowunused,** extends androidx.fragment.app.Fragment {
public <init>();
}
# 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,** {
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 !cr_allowunused,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>;
}
# File: ../../base/android/proguard/chromium_code.flags
# 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>();
}
# TODO(agrieve): Remove once we start to use Android U SDK.
-dontwarn android.window.BackEvent
-dontwarn android.window.OnBackAnimationCallback
# File: ../../build/android/dcheck_is_off.flags
# Copyright 2019 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 are applied only when ENABLE_DCHECK=false.
-checkdiscard @org.chromium.build.annotations.CheckDiscard class ** {
*;
}
-checkdiscard class ** {
@org.chromium.build.annotations.CheckDiscard *;
}
# We always expect ServiceLoader.load() calls to be resolved by R8.
-whyareyounotinlining class java.util.ServiceLoader { *** load(...); }
# This has a ServiceLoader.load() failure that we filter out in dex.py.
-checkdiscard class !cr_allowunused,kotlinx.coroutines.internal.FastServiceLoader {
*;
}
# Remove kotlin assertions since they add a lot of string and rarely fail.
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void check*(...);
}
# File: ../../chrome/android/proguard/main.flags
# 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.
# Every fragment must have an empty constructor, so it can be instantiated when
# restoring its activity's state.
-keep public class org.chromium.** extends androidx.fragment.app.Fragment {
public <init>();
}
# These classes aren't themselves referenced, but __ProcessService[0,1,2...] are
# referenced, and we look up these services by appending a number onto the name
# of the base class. Thus, we need to keep the base class name around so that
# the child classes can be looked up.
-keep class org.chromium.content.app.SandboxedProcessService {
public <init>();
}
-keep class org.chromium.content.app.PrivilegedProcessService {
public <init>();
}
# Let proguard know CastMediaOptions in CastOptions is always null, so it can
# trim unused MediaNotificationService methods. This saves about 170 methods in
# the dex file. https://crbug.com/855081
-assumenosideeffects class com.google.android.gms.cast.framework.CastOptions {
*** getCastMediaOptions() return null;
}
# Also, because CastOptions creates a default CastMediaOptions object upon
# construction, we need to trim out the its builder as well, so we are truly
# assuming there's no CastMediaOptions instances anywhere. This is to avoid
# CastMediaOptions to reference resources upon construction.
-assumenosideeffects class com.google.android.gms.cast.framework.media.CastMediaOptions$Builder {
public <init>();
public <clinit>();
*** build() return null;
}
# Keep implementation classes needed for split compat. These will be accessed by
# reflection.
-keep,allowobfuscation public class ** extends org.chromium.chrome.browser.base.SplitCompat*$Impl {
public <init>();
}
# File: ../../third_party/android_deps/material_design.flags
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We're setting ignore_proguard_configs to avoid a rule keeping Behaviour
# subclasses, but we need this one still.
-if class androidx.appcompat.app.AppCompatViewInflater
-keep class com.google.android.material.theme.MaterialComponentsViewInflater {
<init>();
}
# File: ../../third_party/gvr-android-sdk/proguard-gvr-chromium.txt
-dontwarn com.google.common.logging.nano.Vr$**
-dontwarn com.google.vr.**
# Since we manually register, we need to keep every native method.
-keepclasseswithmembers,includedescriptorclasses class com.google.vr.** {
native <methods>;
}
# File: ../../third_party/gvr-android-sdk/src/proguard-gvr.txt
# Don't obfuscate any NDK/SDK code. This makes the debugging of stack traces
# in release builds easier.
-keepnames class com.google.vr.ndk.** { *; }
-keepnames class com.google.vr.sdk.** { *; }
# These are part of the Java <-> native interfaces for GVR.
-keepclasseswithmembernames,includedescriptorclasses class com.google.vr.** {
native <methods>;
}
# The SDK configuration class member names are useful for debugging client logs.
-keepclasseswithmembernames,allowoptimization class com.google.common.logging.nano.Vr$VREvent$SdkConfigurationParams** {
*;
}
-keep class com.google.vr.cardboard.UsedByNative
-keep @com.google.vr.cardboard.UsedByNative class *
-keepclassmembers class * {
@com.google.vr.cardboard.UsedByNative *;
}
-keep class com.google.vr.cardboard.annotations.UsedByNative
-keep @com.google.vr.cardboard.annotations.UsedByNative class *
-keepclassmembers class * {
@com.google.vr.cardboard.annotations.UsedByNative *;
}
-keep class com.google.vr.cardboard.annotations.UsedByReflection
-keep @com.google.vr.cardboard.annotations.UsedByReflection class *
-keepclassmembers class * {
@com.google.vr.cardboard.annotations.UsedByReflection *;
}
-dontwarn com.google.protobuf.nano.NanoEnumValue
# File: ../../third_party/cardboard/proguard-rules.pro
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Keep classes, methods, and fields that are accessed with JNI.
-keep class com.google.cardboard.sdk.UsedByNative
-keepclasseswithmembers,includedescriptorclasses class ** {
@com.google.cardboard.sdk.UsedByNative *;
}
# Keep proto methods that are directly queried over JNI since proguard cannot
# determine which methods those are.
-keep,includedescriptorclasses class com.google.cardboard.proto.CardboardDevice$DeviceParams$VerticalAlignmentType {
ordinal();
}
-keep,includedescriptorclasses class com.google.cardboard.proto.CardboardDevice$DeviceParams {
getScreenToLensDistance();
getInterLensDistance();
getTrayToLensDistance();
getVerticalAlignment();
getDistortionCoefficients(int);
getDistortionCoefficientsCount();
getLeftEyeFieldOfViewAngles(int);
}
# File: ../../content/public/android/proguard.flags
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(crbug/1426964): Remove this -dontwarn once chrome builds with Android U SDK.
-dontwarn android.adservices.**
# File: ../../android_webview/support_library/boundary_interfaces/proguard.flags
# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We need to avoid obfuscating the support library boundary interface because
# this API is shared with the Android Support Library.
# Note that we only 'keep' the package org.chromium.support_lib_boundary itself,
# any sub-packages of that package can still be obfuscated.
-keep public class org.chromium.support_lib_boundary.* { public *; }
# File: ../../android_webview/nonembedded/java/proguard.flags
# 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.
-keepclassmembers class org.chromium.android_webview.AwPdfExporter {
android.view.ViewGroup mContainerView;
}
# Keep the factory and its public members; it's the main entry point used by the
# framework. Also keep the factory's constructors as some things are using them
# via reflection; crbug.com/1462346
-keep class com.android.webview.chromium.WebViewChromiumFactoryProvider {
public *;
<init>(...);
}
-keep class com.android.webview.chromium.WebViewChromiumFactoryProviderFor* {
public *;
<init>(...);
}
-keep class * implements android.webkit.WebViewFactoryProvider$Statics {
*;
}
-keep class com.android.webview.chromium.ContentSettingsAdapter {
public *;
}
-keep class com.android.webview.chromium.WebViewDatabaseAdapter {
public *;
}
# This is the main entry point for APIs. It is kept to make developing with
# unreleased Android easier.
-keep class com.android.webview.chromium.WebViewChromium {
public *;
}
# This rule prevents class merging on R$* resource classes (for example, R$anim,
# R$styleable, R$bool). This causes issues for WebView when unused resource
# stripping, since in WebView we are forced to detect which resources are unused
# by scanning the dex file for R$<res_type>.<res_name>. Having the R$* classes
# being merged together means that R$anim.foo may now be found in R$bool.foo,
# and this mistakenly will mark the foo resouce to be removed. More details in
# crbug.com/1348329.
-keep,allowaccessmodification,allowobfuscation,allowshrinking class **.R$*
# Functor classes with native methods implemented in Android.
-keep class com.android.webview.chromium.DrawFunctor
-keep class com.android.webview.chromium.DrawGLFunctor
-keep class com.android.webview.chromium.GraphicsUtils
# The lock file object must be kept explicitly to avoid it being optimized
# away and the lock released by the object's finalizer.
-keep class org.chromium.android_webview.AwDataDirLock {
java.nio.channels.FileLock sExclusiveFileLock;
java.io.RandomAccessFile sLockFile;
}
# File: ../../chrome/android/features/start_surface/proguard.flags
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To fix crbug/1017396. This is because AppBarLayout$ScrollingViewBehavior
# is instantiated via java.lang.reflect.Constructor in CoordinatorLayout.java.
# Note that AppBarLayout$Behavior is needed to keep the scrolling behavior.
-keep class com.google.android.material.appbar.AppBarLayout$Behavior {
public <init>(android.content.Context, android.util.AttributeSet);
public <init>();
}
-keep class com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior {
public <init>(android.content.Context, android.util.AttributeSet);
public <init>();
}
# File: obj/third_party/androidx/androidx_appcompat_appcompat_java/proguard.txt
# Copyright (C) 2018 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Never inline methods, but allow shrinking and obfuscation.
-keepclassmembernames,allowobfuscation,allowshrinking class androidx.appcompat.widget.AppCompatTextViewAutoSizeHelper$Impl* {
<methods>;
}
# File: obj/third_party/androidx/androidx_fragment_fragment_java/proguard.txt
# Copyright (C) 2020 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The default FragmentFactory creates Fragment instances using reflection
-if public class ** extends androidx.fragment.app.Fragment
-keepclasseswithmembers,allowobfuscation public class <1> {
public <init>();
}
# FragmentTransition will reflectively lookup:
# androidx.transition.FragmentTransitionSupport
# We should ensure that we keep the constructor if the code using this is alive
-if class androidx.fragment.app.FragmentTransition {
private static androidx.fragment.app.FragmentTransitionImpl resolveSupportImpl();
}
-keep class androidx.transition.FragmentTransitionSupport {
public <init>();
}
# File: obj/third_party/androidx/androidx_lifecycle_lifecycle_viewmodel_java/proguard.txt
-keepclassmembers,allowobfuscation class * extends androidx.lifecycle.ViewModel {
<init>();
}
-keepclassmembers,allowobfuscation class * extends androidx.lifecycle.AndroidViewModel {
<init>(android.app.Application);
}
# File: obj/third_party/androidx/androidx_lifecycle_lifecycle_viewmodel_savedstate_java/proguard.txt
-keepclassmembers,allowobfuscation class * extends androidx.lifecycle.ViewModel {
<init>(androidx.lifecycle.SavedStateHandle);
}
-keepclassmembers,allowobfuscation class * extends androidx.lifecycle.AndroidViewModel {
<init>(android.app.Application,androidx.lifecycle.SavedStateHandle);
}
# File: obj/third_party/androidx/androidx_media_media_java/proguard.txt
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Prevent Parcelable objects from being removed or renamed.
-keep class android.support.v4.media.** implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# Prevent Parcelable objects from being removed or renamed.
-keep class androidx.media.** implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# File: obj/third_party/androidx/androidx_mediarouter_mediarouter_java/proguard.txt
# Copyright 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Allow R8 / ProGuard to remove debugging code.
-assumevalues class androidx.mediarouter.** {
static boolean DEBUG return false;
}
# File: obj/third_party/androidx/androidx_recyclerview_recyclerview_java/proguard.txt
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# When layoutManager xml attribute is used, RecyclerView inflates
#LayoutManagers' constructors using reflection.
-keep public class * extends androidx.recyclerview.widget.RecyclerView$LayoutManager {
public <init>(android.content.Context, android.util.AttributeSet, int, int);
public <init>();
}
-keepclassmembers class androidx.recyclerview.widget.RecyclerView {
public void suppressLayout(boolean);
public boolean isLayoutSuppressed();
}
# File: obj/third_party/androidx/androidx_savedstate_savedstate_java/proguard.txt
# Copyright (C) 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-keepclassmembers,allowobfuscation class * implements androidx.savedstate.SavedStateRegistry$AutoRecreated {
<init>();
}
# File: obj/third_party/androidx/androidx_transition_transition_java/proguard.txt
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Keep a field in transition that is used to keep a reference to weakly-referenced object
-keepclassmembers class androidx.transition.ChangeBounds$* extends android.animation.AnimatorListenerAdapter {
androidx.transition.ChangeBounds$ViewBounds mViewBounds;
}
# File: obj/third_party/androidx/androidx_vectordrawable_vectordrawable_animated_java/proguard.txt
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# keep setters in VectorDrawables so that animations can still work.
-keepclassmembers class androidx.vectordrawable.graphics.drawable.VectorDrawableCompat$* {
void set*(***);
*** get*();
}
# File: obj/third_party/androidx/androidx_versionedparcelable_versionedparcelable_java/proguard.txt
-keep class * implements androidx.versionedparcelable.VersionedParcelable
-keep public class android.support.**Parcelizer { *; }
-keep public class androidx.**Parcelizer { *; }
-keep public class androidx.versionedparcelable.ParcelImpl
# File: ../../third_party/arcore-android-sdk-client/proguard.txt
# Keep ARCore public-facing classes
# This line from the ARCore SDK's .aar should not be needed when consuming ARCore SDK:
# -keepparameternames
# These are part of the Java <-> native interfaces for ARCore.
-keepclasseswithmembernames,includedescriptorclasses class !com.google.ar.core.viewer.**, !com.google.ar.core.services.logging.**, !com.google.ar.sceneform.**, com.google.ar.** {
native <methods>;
}
# This line from the ARCore SDK's .aar should not be needed when consuming ARCore SDK:
# -keep public class !com.google.ar.core.viewer.**, !com.google.ar.core**.R$*, !com.google.ar.core.services.logging.**, com.google.ar.core.** {*;}
# If you need to build a library on top of arcore_client, and use this library for your project
# Please un-comment this line below.
# -keepattributes *Annotation*
-keep class com.google.ar.core.annotations.UsedByNative
-keep @com.google.ar.core.annotations.UsedByNative class *
-keepclassmembers class * {
@com.google.ar.core.annotations.UsedByNative *;
}
-keep class com.google.ar.core.annotations.UsedByReflection
-keep @com.google.ar.core.annotations.UsedByReflection class *
-keepclassmembers class * {
@com.google.ar.core.annotations.UsedByReflection *;
}
# Keep Dynamite classes
# .aidl file will be proguarded, we should keep all Aidls.
# These lines from the ARCore SDK's .aar should not be needed when consuming ARCore SDK:
# -keep class com.google.vr.dynamite.client.IObjectWrapper { *; }
# -keep class com.google.vr.dynamite.client.ILoadedInstanceCreator { *; }
# -keep class com.google.vr.dynamite.client.INativeLibraryLoader { *; }
# Keep annotation files and the file got annotated.
-keep class com.google.vr.dynamite.client.UsedByNative
-keep @com.google.vr.dynamite.client.UsedByNative class *
-keepclassmembers class * {
@com.google.vr.dynamite.client.UsedByNative *;
}
-keep class com.google.vr.dynamite.client.UsedByReflection
-keep @com.google.vr.dynamite.client.UsedByReflection class *
-keepclassmembers class * {
@com.google.vr.dynamite.client.UsedByReflection *;
}
# File: obj/third_party/android_deps/google_android_datatransport_transport_api_java/proguard.txt
-dontwarn com.google.auto.value.AutoValue
-dontwarn com.google.auto.value.AutoValue$Builder
# File: obj/third_party/android_deps/google_firebase_firebase_common_java/proguard.txt
-dontwarn com.google.firebase.platforminfo.KotlinDetector
-dontwarn com.google.auto.value.AutoValue
-dontwarn com.google.auto.value.AutoValue$Builder
# File: obj/third_party/android_deps/google_firebase_firebase_components_java/proguard.txt
-dontwarn com.google.firebase.components.Component$Instantiation
-dontwarn com.google.firebase.components.Component$ComponentType
-keep class * implements com.google.firebase.components.ComponentRegistrar
# File: obj/third_party/android_deps/google_firebase_firebase_messaging_java/proguard.txt
# Analytics library is optional.
# Access to this class is protected by try/catch(NoClassDefFoundError e)
# b/35686744 Don't fail during proguard if the class is missing from the APK.
-dontwarn com.google.android.gms.measurement.AppMeasurement*
# File: obj/third_party/android_deps/google_play_services_auth_base_java/proguard.txt
# We keep all fields for every generated proto file as the runtime uses
# reflection over them that ProGuard cannot detect. Without this keep
# rule, fields may be removed that would cause runtime failures.
-keepclassmembers class * extends com.google.android.gms.internal.auth.zzer {
<fields>;
}
# File: obj/third_party/android_deps/google_play_services_base_java/proguard.txt
# b/35135904 Ensure that proguard will not strip the mResultGuardian.
-keepclassmembers class com.google.android.gms.common.api.internal.BasePendingResult {
com.google.android.gms.common.api.internal.BasePendingResult$ReleasableResultGuardian mResultGuardian;
}
# File: obj/third_party/android_deps/google_play_services_basement_java/proguard.txt
# Needed when building against pre-Marshmallow SDK.
-dontwarn android.security.NetworkSecurityPolicy
# Needed when building against Marshmallow SDK.
-dontwarn android.app.Notification
# Protobuf has references not on the Android boot classpath
-dontwarn sun.misc.Unsafe
-dontwarn libcore.io.Memory
# Internal Google annotations for generating Proguard keep rules.
-dontwarn com.google.android.apps.common.proguard.UsedBy*
# Annotations referenced by the SDK but whose definitions are contained in
# non-required dependencies.
-dontwarn javax.annotation.**
-dontwarn org.checkerframework.**
-dontwarn com.google.errorprone.annotations.**
-dontwarn org.jspecify.nullness.NullMarked
# Proguard flags for consumers of the Google Play services SDK
# https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project
# Keep SafeParcelable NULL value, needed for reflection by DowngradeableSafeParcel
-keepclassmembers public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
# Needed for Parcelable/SafeParcelable classes & their creators to not get renamed, as they are
# found via reflection.
-keep class com.google.android.gms.common.internal.ReflectedParcelable
-keepnames class * implements com.google.android.gms.common.internal.ReflectedParcelable
-keepclassmembers class * implements android.os.Parcelable {
public static final *** CREATOR;
}
# Keep the classes/members we need for client functionality.
-keep @interface android.support.annotation.Keep
-keep @androidx.annotation.Keep class *
-keepclasseswithmembers class * {
@androidx.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@androidx.annotation.Keep <methods>;
}
# Keep androidX equivalent of above android.support to allow Jetification.
-keep @interface androidx.annotation.Keep
-keep @androidx.annotation.Keep class *
-keepclasseswithmembers class * {
@androidx.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@androidx.annotation.Keep <methods>;
}
# Keep the names of classes/members we need for client functionality.
-keep @interface com.google.android.gms.common.annotation.KeepName
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
# Keep Dynamite API entry points
-keep @interface com.google.android.gms.common.util.DynamiteApi
-keep @com.google.android.gms.common.util.DynamiteApi public class * {
public <fields>;
public <methods>;
}
# File: obj/third_party/android_deps/google_play_services_cast_framework_java/proguard.txt
-keep public class * implements com.google.android.gms.cast.framework.OptionsProvider
# File: obj/third_party/android_deps/google_play_services_clearcut_java/proguard.txt
# We keep all fields for every generated proto file as the runtime uses
# reflection over them that ProGuard cannot detect. Without this keep
# rule, fields may be removed that would cause runtime failures.
-keepclassmembers class * extends com.google.android.gms.internal.clearcut.zzcg {
<fields>;
}
# File: obj/third_party/android_deps/google_play_services_gcm_java/proguard.txt
# Ensure that proguard will not strip the handleIntent method.
-keepclassmembers class com.google.android.gms.gcm.GcmListenerService {
public void handleIntent(android.content.Intent);
}
# File: obj/third_party/android_deps/google_play_services_vision_common_java/proguard.txt
# We keep all fields for every generated proto file as the runtime uses
# reflection over them that ProGuard cannot detect. Without this keep
# rule, fields may be removed that would cause runtime failures.
-keepclassmembers class * extends com.google.android.gms.internal.vision.zzjb {
<fields>;
}
# File: obj/third_party/android_deps/google_play_services_vision_java/proguard.txt
# We keep all fields for every generated proto file as the runtime uses
# reflection over them that ProGuard cannot detect. Without this keep
# rule, fields may be removed that would cause runtime failures.
-keepclassmembers class * extends com.google.android.gms.internal.vision.zzjb {
<fields>;
}
# File: ../../base/android/proguard/remove_logging.flags
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Remove Log.d(), Log.v(), and corresponding isLoggable() calls.
# Log.DEBUG = 3, Log.VERBOSE = 2.
# https://stackoverflow.com/questions/73876633/what-does-the-r8-maximumremovedandroidloglevel-option
-maximumremovedandroidloglevel 3
# Makes try-with-resources less inefficient. Saved 3.8kb when added.
-assumenosideeffects class java.lang.Throwable {
void addSuppressed(...);
}
# Remove all logging calls via JDK Loggers. They are generally from
# unused parts of third-party libraries.
-assumenosideeffects class java.util.logging.Logger {
void finest(...);
void finer(...);
void fine(...);
void info(...);
void warning(...);
void severe(...);
void throwing(...);
void log(...);
void logp(...);
static java.util.logging.Logger getLogger(...) return _NONNULL_;
boolean isLoggable(...) return false;
}
# Remove accesses to Level.<thing> that go unused.
-assumenosideeffects class java.util.logging.Level {
<fields>;
# Flogger uses Level objects, so do not set a return value for intValue().
int intValue();
}
# Remove fields of type Logger.
-assumenosideeffects class * {
java.util.logging.Logger * return _NONNULL_;
}
# File: ../../third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android/kotlinx-coroutines-android-1.6.4.jar:META-INF/com.android.tools/r8-from-1.6.0/coroutines.pro
# Allow R8 to optimize away the FastServiceLoader.
# Together with ServiceLoader optimization in R8
# this results in direct instantiation when loading Dispatchers.Main
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
boolean FAST_SERVICE_LOADER_ENABLED return false;
}
-assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoaderKt {
boolean ANDROID_DETECTED return true;
}
# Disable support for "Missing Main Dispatcher", since we always have Android main dispatcher
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatchersKt {
boolean SUPPORT_MISSING return false;
}
# Statically turn off all debugging facilities and assertions
-assumenosideeffects class kotlinx.coroutines.DebugKt {
boolean getASSERTIONS_ENABLED() return false;
boolean getDEBUG() return false;
boolean getRECOVER_STACK_TRACES() return false;
}
# File: ../../third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm/kotlinx-coroutines-core-jvm-1.6.4.jar:META-INF/com.android.tools/r8/coroutines.pro
# When editing this file, update the following files as well:
# - META-INF/proguard/coroutines.pro
# - META-INF/com.android.tools/proguard/coroutines.pro
# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembers class kotlinx.coroutines.** {
volatile <fields>;
}
# Same story for the standard library's SafeContinuation that also uses AtomicReferenceFieldUpdater
-keepclassmembers class kotlin.coroutines.SafeContinuation {
volatile <fields>;
}
# These classes are only required by kotlinx.coroutines.debug.AgentPremain, which is only loaded when
# kotlinx-coroutines-core is used as a Java agent, so these are not needed in contexts where ProGuard is used.
-dontwarn java.lang.instrument.ClassFileTransformer
-dontwarn sun.misc.SignalHandler
-dontwarn java.lang.instrument.Instrumentation
-dontwarn sun.misc.Signal
# Only used in `kotlinx.coroutines.internal.ExceptionsConstructor`.
# The case when it is not available is hidden in a `try`-`catch`, as well as a check for Android.
-dontwarn java.lang.ClassValue
# An annotation used for build tooling, won't be directly accessed.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
# File: //build/android/gyp/proguard.py (generated rules)