• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# Contains flags that we want to apply not only to Chromium APKs, but also to
6# third-party apps that bundle the Cronet library.
7
8# WARNING: rules in this file are applied to entire third-party APKs, not just
9# Chromium code. They MUST be scoped appropriately to avoid side effects on app
10# code that we do not own.
11
12# Keep all CREATOR fields within Parcelable that are kept.
13-keepclassmembers class !cr_allowunused,org.chromium.** implements android.os.Parcelable {
14  public static *** CREATOR;
15}
16
17# Don't obfuscate Parcelables as they might be marshalled outside Chrome.
18# If we annotated all Parcelables that get put into Bundles other than
19# for saveInstanceState (e.g. PendingIntents), then we could actually keep the
20# names of just those ones. For now, we'll just keep them all.
21-keepnames,allowaccessmodification class !cr_allowunused,org.chromium.** implements android.os.Parcelable {}
22
23# Keep all enum values and valueOf methods. See
24# http://proguard.sourceforge.net/index.html#manual/examples.html
25# for the reason for this. Also, see http://crbug.com/248037.
26-keepclassmembers enum !cr_allowunused,org.chromium.** {
27    public static **[] values();
28}
29
30# Required to remove fields until b/274802355 is resolved.
31-assumevalues class !cr_allowunused,** {
32  final org.chromium.base.ThreadUtils$ThreadChecker * return _NONNULL_;
33}
34