Unverified Commit 1e485532 authored by Max's avatar Max Committed by GitHub

Merge pull request #8 from hypothermic/master

Fix NullPointerException in MyWebViewClient
parents 37ec2568 811160c7
......@@ -12,7 +12,8 @@ class MyWebViewClient extends WebViewClient {
@SuppressWarnings("deprecation")
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Objects.requireNonNull(Uri.parse(url).getHost()).endsWith("example.com")) {
Uri uri = Uri.parse(url);
if (uri.getHost() != null && uri.getHost().contains("example.com")) {
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment