Skip to content

Commit c6af46c

Browse files
authoredOct 26, 2021
Don't crash when loading images without internet permission (thunderbird#5745)
Catch SecurityException when unblocking network load
1 parent a951e07 commit c6af46c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎app/ui/legacy/src/main/java/com/fsck/k9/view/MessageWebView.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ public void blockNetworkData(final boolean shouldBlockNetworkData) {
4545
* will network images that are already in the WebView cache.
4646
*
4747
*/
48-
getSettings().setBlockNetworkLoads(shouldBlockNetworkData);
48+
try {
49+
getSettings().setBlockNetworkLoads(shouldBlockNetworkData);
50+
} catch (SecurityException e) {
51+
Timber.e(e, "Failed to unblock network loads. Missing INTERNET permission?");
52+
}
4953
}
5054

5155

0 commit comments

Comments
 (0)
Please sign in to comment.