mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fix crash when opening links.
This commit is contained in:
parent
7aaab803da
commit
7e171ce7d2
1 changed files with 7 additions and 3 deletions
|
@ -53,9 +53,13 @@ public class NewsblurWebview extends WebView {
|
|||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
Uri uri = Uri.parse(url);
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(uri);
|
||||
context.startActivity(i);
|
||||
try {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(uri);
|
||||
context.startActivity(i);
|
||||
} catch (Exception e) {
|
||||
Log.wtf(this.getClass().getName(), "device cannot open URLs");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue