X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fasynctasks%2FSaveUrl.java;h=6b383f4e40de02e435a289cbfcda5fb52973d9fc;hp=e6b811500726162066086320c13053c9869950b5;hb=ba4a1c032dbffde044b70c804f9d3c1f1ba7b939;hpb=d665a89a28f33c9feaaf217f7cabc0c809cb7107 diff --git a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/SaveUrl.java b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/SaveUrl.java index e6b81150..6b383f4e 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/SaveUrl.java +++ b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/SaveUrl.java @@ -41,7 +41,6 @@ import com.stoutner.privacybrowser.views.NoSwipeViewPager; import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.ref.WeakReference; @@ -214,7 +213,7 @@ public class SaveUrl extends AsyncTask { // Close the output stream. outputStream.close(); - // Define a media scanner intent, which adds items like pictures to Android's recent file list. + // Create a media scanner intent, which adds items like pictures to Android's recent file list. Intent mediaScannerIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); // Add the URI to the media scanner intent. @@ -226,7 +225,7 @@ public class SaveUrl extends AsyncTask { // Disconnect the HTTP URL connection. httpUrlConnection.disconnect(); } - } catch (IOException exception) { + } catch (Exception exception) { // Store the error in the save disposition string. saveDisposition = exception.toString(); }