mirror of
https://github.com/shuto-cn/cordova-plugin-inappbrowser.git
synced 2025-04-27 03:40:11 +08:00
Amazon Specific changes:
Added logs and corrected indentation according to 81161ebe668a14f87e1ef4b57f2d300a609b9a8b
This commit is contained in:
parent
32c0e41c43
commit
a0785deff8
@ -126,21 +126,24 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
// load in webview
|
// load in webview
|
||||||
if (url.startsWith("file://") || url.startsWith("javascript:")
|
if (url.startsWith("file://") || url.startsWith("javascript:")
|
||||||
|| Config.isUrlWhiteListed(url)) {
|
|| Config.isUrlWhiteListed(url)) {
|
||||||
|
Log.d(LOG_TAG, "loading in webview");
|
||||||
webView.loadUrl(url);
|
webView.loadUrl(url);
|
||||||
}
|
}
|
||||||
//Load the dialer
|
//Load the dialer
|
||||||
else if (url.startsWith(AmazonWebView.SCHEME_TEL))
|
else if (url.startsWith(AmazonWebView.SCHEME_TEL))
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
Log.d(LOG_TAG, "loading in dialer");
|
||||||
Intent intent = new Intent(Intent.ACTION_DIAL);
|
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||||
intent.setData(Uri.parse(url));
|
intent.setData(Uri.parse(url));
|
||||||
cordova.getActivity().startActivity(intent);
|
cordova.getActivity().startActivity(intent);
|
||||||
} catch (android.content.ActivityNotFoundException e) {
|
} catch (android.content.ActivityNotFoundException e) {
|
||||||
LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
|
LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// load in InAppBrowser
|
// load in InAppBrowser
|
||||||
else {
|
else {
|
||||||
|
Log.d(LOG_TAG, "loading in InAppBrowser");
|
||||||
result = showWebPage(url, features);
|
result = showWebPage(url, features);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user