summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Jensen <pauljensen@google.com> 2015-06-09 17:11:08 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-06-09 17:11:10 +0000
commit16bef48d2226c72167e3314f2bc48b0f5de61d81 (patch)
tree8c701dfea1bd3e80e01bc4693c3b2a6717091ca1
parent659716d7a03553006e67b01008c2e9e03a20ed31 (diff)
parentfd54da9b7ccf8218bb99cbbe540fd71ea411508b (diff)
Merge "Add support for tel: links in captive portal app." into mnc-dev
-rw-r--r--packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index d876264e18ad..d00f850772d0 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -342,6 +342,15 @@ public class CaptivePortalLoginActivity extends Activity {
getString(R.string.ssl_error_continue));
view.loadDataWithBaseURL(INTERNAL_ASSETS, html, "text/HTML", "UTF-8", null);
}
+
+ @Override
+ public boolean shouldOverrideUrlLoading (WebView view, String url) {
+ if (url.startsWith("tel:")) {
+ startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse(url)));
+ return true;
+ }
+ return false;
+ }
}
private class MyWebChromeClient extends WebChromeClient {