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 {
74
74
}
75
75
76
76
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
+ }
78
84
InputStream stream = null ;
79
85
try {
80
86
stream = context .getContentResolver ().openInputStream (Uri .parse (realPath ));
You can’t perform that action at this time.
0 commit comments