• Torne (Richard Coles)'s avatar
    Add missing Proguard rule for library R class. · bfe48f4d
    Torne (Richard Coles) authored
    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: default avatarAndrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#702861}
    bfe48f4d
compile_resources.py 37 KB