Commit aceecfcd authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

weblayer: fetch more implementation package info.

Fetch shared library file data from the implementation package to
construct the correct asset path when using a Trichrome APK.

Change-Id: Id7bd259e5be182d6b13828235636d41b812ffdbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829867
Auto-Submit: Richard Coles <torne@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706141}
parent c3f67b1b
......@@ -79,8 +79,9 @@ public final class WebLayer {
// TODO: Make asset loading work on L, where WebViewDelegate doesn't exist.
// WebViewDelegate.addWebViewAssetPath() accesses the currently loaded package info from
// WebViewFactory, so we have to fake it.
implPackageInfo = appContext.getPackageManager().getPackageInfo(
getImplPackageName(appContext), PackageManager.GET_META_DATA);
implPackageInfo =
appContext.getPackageManager().getPackageInfo(getImplPackageName(appContext),
PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_META_DATA);
Field packageInfo = WebViewFactory.class.getDeclaredField("sPackageInfo");
packageInfo.setAccessible(true);
packageInfo.set(null, implPackageInfo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment