Catch all throwable while calling DownloadManager

This commit is contained in:
seven332 committed 2018-12-21 18:26:21 +08:00
1 parent 8af786e687
commit 8d75752835
1 file changed
+7 -1
@@ -1811,7 +1811,13 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
r.allowScanningByMediaScanner();
r.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
dm.enqueue(r);
if (dm != null) {
try {
dm.enqueue(r);
} catch (Throwable e) {
ExceptionUtils.throwIfFatal(e);
}
}
}
if (mDialog != null) {