Add support for tel: links in captive portal app.

Bug:21447011
Change-Id: I72ec4fd780ddb89cecfa584aa285f3822f326810
This commit is contained in:
Paul Jensen
2015-06-09 07:50:51 -04:00
parent 3eb63dc35e
commit fd54da9b7c

View File

@@ -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 {