diff options
author | Paul Jensen <pauljensen@google.com> | 2015-06-09 07:50:51 -0400 |
---|---|---|
committer | Paul Jensen <pauljensen@google.com> | 2015-06-09 07:50:51 -0400 |
commit | fd54da9b7ccf8218bb99cbbe540fd71ea411508b (patch) | |
tree | 2077679494b3dfc1b7b20445447c5290eb7f3f7c | |
parent | 3eb63dc35e7ac0335defe4f8e7b42f5dcc390b42 (diff) | |
download | frameworks_base-fd54da9b7ccf8218bb99cbbe540fd71ea411508b.zip frameworks_base-fd54da9b7ccf8218bb99cbbe540fd71ea411508b.tar.gz frameworks_base-fd54da9b7ccf8218bb99cbbe540fd71ea411508b.tar.bz2 |
Add support for tel: links in captive portal app.
Bug:21447011
Change-Id: I72ec4fd780ddb89cecfa584aa285f3822f326810
-rw-r--r-- | packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java | 9 |
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 d876264..d00f850 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 { |