From c0618b66853a00fbee4c71f3698c13898fe3c45b Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 9 Aug 2021 17:53:05 +0200 Subject: [PATCH] Suppress error --- .../java/eu/faircode/email/FragmentCompose.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index b24eb7d0c7..fe0a4d1ff7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -2755,7 +2755,21 @@ public class FragmentCompose extends FragmentBase { ex.getCause() instanceof ErrnoException && ((ErrnoException) ex.getCause()).errno == ENOSPC) ex = new IOException(getContext().getString(R.string.app_cake), ex); - Log.unexpectedError(getParentFragmentManager(), ex, !(ex instanceof IOException)); + Log.unexpectedError(getParentFragmentManager(), ex, + !(ex instanceof IOException || ex.getCause() instanceof IOException)); + /* + java.lang.IllegalStateException: java.io.IOException: Failed to redact /storage/emulated/0/Download/97203830-piston-vecteur-icĂ´ne-simple-symbole-plat-sur-fond-blanc.jpg + at android.os.Parcel.createExceptionOrNull(Parcel.java:2381) + at android.os.Parcel.createException(Parcel.java:2357) + at android.os.Parcel.readException(Parcel.java:2340) + at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190) + at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153) + at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:804) + at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2002) + at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1817) + at android.content.ContentResolver.openInputStream(ContentResolver.java:1494) + at eu.faircode.email.FragmentCompose.addAttachment(SourceFile:27) + */ } } }.execute(this, args, "compose:attachment:add");