[WebLayer] Fix crash when other shared resource library is loaded
This changes the hardcoded package ID from 0x02 to 0x05, which allows for other shared libraries to be loaded before WebLayer. This change calls addAssetPath on the AssetManager to increment the package ID until we hit our magic 0x05. Each call needs to use a different path and the path has to be a valid asset path, so we prepend a string of "/." to the WebView package's source dir. This also fixes crbug.com/1075704 by hardcoding the package IDs of the locale resources to 0x05, which will load them at the same ID the main APK will be loaded. This also prevents each split from taking a new dynamic ID. Bug: 1075704, 1075789 Change-Id: I671d0ad64a3025409a62ecebbdbc584819d68ad5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174964Reviewed-by:Mounir Lamouri <mlamouri@chromium.org> Reviewed-by:
Richard Coles <torne@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Commit-Queue: Clark DuVall <cduvall@chromium.org> Cr-Commit-Position: refs/heads/master@{#765318}
Showing
Please register or sign in to comment