Browse Source

fix: check error on open attachment

closes: #10
main
Distopico Vegan 6 years ago
parent
commit
87a22a901f
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      app/src/main/java/org/dystopia/email/ActivityView.java

+ 4
- 0
app/src/main/java/org/dystopia/email/ActivityView.java View File

@ -58,6 +58,7 @@ import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.google.android.material.snackbar.Snackbar;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -66,6 +67,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.net.URL;
import java.text.Collator;
import java.util.ArrayList;
@ -1102,6 +1104,8 @@ public class ActivityView extends ActivityBase
while ((read = fis.read(buffer)) != -1) {
fos.write(buffer, 0, read);
}
} catch (FileNotFoundException ex) {
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
} finally {
try {
if (pfd != null) {


Loading…
Cancel
Save