simplify config

This commit is contained in:
slymax
2020-04-13 10:00:01 +02:00
parent a104b83571
commit 8e7a8d7811
2 changed files with 5 additions and 2 deletions

View File

@ -10,7 +10,10 @@ class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
String hostname;
// YOUR HOSTNAME
hostname = "example.com";
Uri uri = Uri.parse(url);
if (url.startsWith("file:") || uri.getHost() != null && uri.getHost().endsWith(hostname)) {
return false;