File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/android/com/ionicframework/cordova/webview Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,13 @@ public InputStream openFile(String filePath) throws IOException {
7474 }
7575
7676 public InputStream openContentUrl (Uri uri ) throws IOException {
77- String realPath = uri .toString ().replace (uri .getScheme () + "://" + uri .getHost () + WebViewLocalServer .contentStart , "content:/" );
77+ Integer port = uri .getPort ();
78+ String realPath ;
79+ if (port == -1 ) {
80+ realPath = uri .toString ().replace (uri .getScheme () + "://" + uri .getHost () + WebViewLocalServer .contentStart , "content:/" );
81+ } else {
82+ realPath = uri .toString ().replace (uri .getScheme () + "://" + uri .getHost () + ":" + port + WebViewLocalServer .contentStart , "content:/" );
83+ }
7884 InputStream stream = null ;
7985 try {
8086 stream = context .getContentResolver ().openInputStream (Uri .parse (realPath ));
You can’t perform that action at this time.
0 commit comments