Update InAppBrowser.java

in line with allowing custom URI schemes and this issue I've changed the if statement that enforces http for no apparent reason: https://github.com/apache/cordova-plugin-inappbrowser/issues/548
This commit is contained in:
AhrenFullStop 2019-10-09 10:20:50 +02:00 committed by GitHub
parent 80feff6cf8
commit 9a10be0993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1379,17 +1379,7 @@ public class InAppBrowser extends CordovaPlugin {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
String newloc = "";
if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) {
newloc = url;
}
else
{
// Assume that everything is HTTP at this point, because if we don't specify,
// it really should be. Complain loudly about this!!!
LOG.e(LOG_TAG, "Possible Uncaught/Unknown URI");
newloc = "http://" + url;
}
String newloc = url;
// Update the UI if we haven't already
if (!newloc.equals(edittext.getText().toString())) {