Add just a bit more logging

This commit is contained in:
Marcel Kinard 2014-08-27 14:11:43 -04:00
parent 683937872d
commit 81161ebe66

View File

@ -120,21 +120,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(WebView.SCHEME_TEL)) else if (url.startsWith(WebView.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);
} }
} }