Reduced logging

pull/202/head
M66B 3 years ago
parent b109358419
commit 1f449c9e58

@ -67,6 +67,7 @@ import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout; import com.google.android.material.textfield.TextInputLayout;
import com.sun.mail.imap.IMAPFolder; import com.sun.mail.imap.IMAPFolder;
import java.io.FileNotFoundException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -600,7 +601,10 @@ public class FragmentAccount extends FragmentBase {
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
if (ex instanceof IllegalArgumentException || ex instanceof UnknownHostException) if (ex.getMessage() != null &&
(ex instanceof UnknownHostException ||
ex instanceof FileNotFoundException ||
ex instanceof IllegalArgumentException))
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG) Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG)
.setGestureInsetBottomIgnored(true).show(); .setGestureInsetBottomIgnored(true).show();
else else

@ -64,6 +64,7 @@ import androidx.preference.PreferenceManager;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout; import com.google.android.material.textfield.TextInputLayout;
import java.io.FileNotFoundException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -595,7 +596,10 @@ public class FragmentIdentity extends FragmentBase {
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
if (ex instanceof IllegalArgumentException || ex instanceof UnknownHostException) if (ex.getMessage() != null &&
(ex instanceof UnknownHostException ||
ex instanceof FileNotFoundException ||
ex instanceof IllegalArgumentException))
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG) Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG)
.setGestureInsetBottomIgnored(true).show(); .setGestureInsetBottomIgnored(true).show();
else else

Loading…
Cancel
Save