Add missing Proguard rule for library R class.
The framework attempts to call {manifest_package}.R.onResourcesLoaded()
when an APK that is built as a library (typically WebView) is run as a
standalone app, which is intended to fix the R class references to point
to the correct package ID.
We usually already generate the required class/method, but we weren't
keeping it during proguard. Fixing this by adding the missing keep rule
and ensuring that we always generate a class with the right package
means that code running in the context of the WebView APK should now be
able to refer to resources normally via the R class without needing to
use getIdentifier.
Bug: 1009982
Change-Id: Ib33d59ca2696ba949536be34c997690a310c2370
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834042
Commit-Queue: Richard Coles <torne@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702861}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .