Don't crash when loading images without internet permission (#5745)
Catch SecurityException when unblocking network load
This commit is contained in:
parent
a951e07fed
commit
c6af46ce58
1 changed files with 5 additions and 1 deletions
|
@ -45,7 +45,11 @@ public class MessageWebView extends WebView {
|
|||
* will network images that are already in the WebView cache.
|
||||
*
|
||||
*/
|
||||
getSettings().setBlockNetworkLoads(shouldBlockNetworkData);
|
||||
try {
|
||||
getSettings().setBlockNetworkLoads(shouldBlockNetworkData);
|
||||
} catch (SecurityException e) {
|
||||
Timber.e(e, "Failed to unblock network loads. Missing INTERNET permission?");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue