diff options
author | Torne (Richard Coles) <torne@chromium.org> | 2015-05-26 18:17:46 +0100 |
---|---|---|
committer | Torne (Richard Coles) <torne@chromium.org> | 2015-05-26 17:18:45 +0000 |
commit | d622d4cf31b9de528cb194edb05857013bed6c8c (patch) | |
tree | 27650431664988f0bd970921f877b0eb7b330b2c | |
parent | f51a70d1759019a9ea68f69a2b6f88ddf9d58217 (diff) | |
download | chromium_src-d622d4cf31b9de528cb194edb05857013bed6c8c.zip chromium_src-d622d4cf31b9de528cb194edb05857013bed6c8c.tar.gz chromium_src-d622d4cf31b9de528cb194edb05857013bed6c8c.tar.bz2 |
Add missing R class to WebView resource rewriting.
We weren't rewriting the resources for web_contents_delegate_android,
resulting in crashes any time a resource was loaded by that component
(e.g. popup bubbles for HTML form validation failures). Add it to the
list and also clean up outdated comments here that refer to previous
versions of this code. Add a TODO to track finding a better way to do
this which is less fragile.
BUG=490826
Review URL: https://codereview.chromium.org/1154853005
Cr-Commit-Position: refs/heads/master@{#331356}
(cherry picked from commit f417eb24ae1c89a02b081571aeed1403cc39a1cc)
Review URL: https://codereview.chromium.org/1156133004
Cr-Commit-Position: refs/branch-heads/2357@{#439}
Cr-Branched-From: 59d4494849b405682265ed5d3f5164573b9a939b-refs/heads/master@{#323860}
-rw-r--r-- | android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java b/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java index 4f47587..6f2902c 100644 --- a/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java +++ b/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java @@ -6,20 +6,18 @@ package com.android.webview.chromium; /** * Helper class used to fix up resource ids. - * This is mostly a copy of the code in frameworks/base/core/java/android/app/LoadedApk.java. - * TODO: Remove if a cleaner mechanism is provided (either public API or AAPT is changed to generate - * this code). */ class ResourceRewriter { /** * Rewrite the R 'constants' for the WebView library apk. */ public static void rewriteRValues(final int packageId) { - // TODO: We should use jarjar to remove the redundant R classes here, but due - // to a bug in jarjar it's not possible to rename classes with '$' in their name. - // See b/15684775. + // This list must be kept up to date to include all R classes depended on directly or + // indirectly by android_webview_java. + // TODO(torne): find a better way to do this, http://crbug.com/492166. com.android.webview.chromium.R.onResourcesLoaded(packageId); org.chromium.android_webview.R.onResourcesLoaded(packageId); + org.chromium.components.web_contents_delegate_android.R.onResourcesLoaded(packageId); org.chromium.content.R.onResourcesLoaded(packageId); org.chromium.ui.R.onResourcesLoaded(packageId); } |