New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690495 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Add a keep xml file to Cronet distribution to keep the string resource referenced by CronetProvider class

Project Member Reported by kapishnikov@chromium.org, Feb 9 2017

Issue description

CronetProvider indirectly reads the value of "CronetProviderClassName" string resource in order to search for additional providers. Since the resource is referenced indirectly, it can be removed by the Android resource shrinker. The solution is to add a res/raw/keep_cronet_api.xml file that contains:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
  tools:keep="@string/CronetProviderClassName" />

This will signal the shrinker not to remove the resource if it is not referenced directly (i.e. through the R class) inside the embedder app.

In the future, this file should be a part of the Cronet distribution AAR file.
 
Owner: kapishnikov@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1d72039b3d964ca71077ffb8208c62215a4735a0

commit 1d72039b3d964ca71077ffb8208c62215a4735a0
Author: kapishnikov <kapishnikov@chromium.org>
Date: Fri Feb 10 21:22:38 2017

Add keep_cronet_api.xml to keep @string/CronetProviderClassName

BUG= 690495 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2691493003
Cr-Commit-Position: refs/heads/master@{#449737}

[modify] https://crrev.com/1d72039b3d964ca71077ffb8208c62215a4735a0/components/cronet/android/BUILD.gn
[add] https://crrev.com/1d72039b3d964ca71077ffb8208c62215a4735a0/components/cronet/android/api/res/raw/keep_cronet_api.xml

Comment 3 by mef@chromium.org, Feb 14 2017

Status: Fixed (was: Started)

Sign in to add a comment