Skip to content

Commit 1460598

Browse files
Selim GurunAndroid (Google) Code Review
authored andcommitted
Merge "Fix file path calculation for asset files."
2 parents b269aaf + 658dcd8 commit 1460598

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/java/android/webkit/BrowserFrame.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,8 @@ private InputStream inputStreamForAndroidResource(String url) {
742742
url = url.replaceFirst(ANDROID_ASSET, "");
743743
try {
744744
AssetManager assets = mContext.getAssets();
745-
return assets.open(url, AssetManager.ACCESS_STREAMING);
745+
Uri uri = Uri.parse(url);
746+
return assets.open(uri.getPath(), AssetManager.ACCESS_STREAMING);
746747
} catch (IOException e) {
747748
return null;
748749
}

0 commit comments

Comments
 (0)