mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
ecc0392f77
commit
87f1655f16
|
@ -222,7 +222,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
|||
view.setData(Uri.parse(BuildConfig.PRO_FEATURES_URI + "?challenge=" + getChallenge(this)));
|
||||
Helper.view(this, view);
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
|||
}
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
reportError(null, Helper.formatThrowable(ex, false));
|
||||
reportError(null, Log.formatThrowable(ex, false));
|
||||
}
|
||||
|
||||
editor.apply();
|
||||
|
|
|
@ -108,7 +108,7 @@ public class ActivityDSN extends ActivityBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(findViewById(android.R.id.content), ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "disposition:decode");
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ public class ActivityEML extends ActivityBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(findViewById(android.R.id.content), ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "eml:decode");
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ public class ActivityEML extends ActivityBase {
|
|||
if (ex instanceof IllegalArgumentException || ex instanceof FileNotFoundException)
|
||||
ToastEx.makeText(ActivityEML.this, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "eml:attachment");
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ public class ActivityEML extends ActivityBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(findViewById(android.R.id.content), ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(ActivityEML.this, args, "eml:store");
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ public class ActivityEML extends ActivityBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, @NonNull Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "messages:accounts");
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
fragment.setArguments(args);
|
||||
fragment.show(getSupportFragmentManager(), "password");
|
||||
} catch (Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -636,7 +636,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(ActivitySetup.this, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "setup:export");
|
||||
}
|
||||
|
@ -998,7 +998,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
else if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(ActivitySetup.this, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "setup:import");
|
||||
}
|
||||
|
@ -1069,7 +1069,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(ActivitySetup.this, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "setup:cert");
|
||||
}
|
||||
|
@ -1313,7 +1313,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(ActivitySetup.this, args, "graph:profile");
|
||||
}
|
||||
|
|
|
@ -637,7 +637,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
ToastEx.makeText(ActivityView.this,
|
||||
Helper.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.execute(this, new Bundle(), "crash:log");
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
if (ex instanceof IllegalArgumentException || ex instanceof IOException)
|
||||
ToastEx.makeText(ActivityView.this, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "update:check");
|
||||
}
|
||||
|
@ -889,7 +889,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "menu:outbox");
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(ActivityWidgetUnified.this, args, "widget:folders");
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "widget:accounts");
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "account:enable");
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "rule:enable");
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, new Bundle(), "answer:composable");
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "attachment:delete");
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "attachment:fetch");
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "contact:state");
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "contact:favorite");
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "contact:delete");
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "folder:collapse");
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "folder:enable");
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "folder:subscribe");
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "identitty:enable");
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "identitty:clear_sign_key");
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "image:fetch");
|
||||
}
|
||||
|
|
|
@ -920,7 +920,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.setLog(false).execute(context, owner, aargs, "message:avatar");
|
||||
} else
|
||||
|
@ -1252,7 +1252,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.setLog(false).execute(context, owner, sargs, "message:actions");
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:body");
|
||||
}
|
||||
|
@ -1764,7 +1764,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.setLog(false).execute(context, owner, args, "message:calendar");
|
||||
}
|
||||
|
@ -1907,7 +1907,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:participation");
|
||||
}
|
||||
|
@ -2106,7 +2106,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:seen");
|
||||
}
|
||||
|
@ -2268,7 +2268,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:flag");
|
||||
}
|
||||
|
@ -2334,7 +2334,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:search");
|
||||
}
|
||||
|
@ -2519,7 +2519,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:attachment:download");
|
||||
}
|
||||
|
@ -2688,7 +2688,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "show:images");
|
||||
}
|
||||
|
@ -2783,7 +2783,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:reply");
|
||||
}
|
||||
|
@ -2854,7 +2854,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, new Bundle(), "message:answer");
|
||||
}
|
||||
|
@ -2937,7 +2937,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:move:draft");
|
||||
}
|
||||
|
@ -3161,7 +3161,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
else
|
||||
ToastEx.makeText(context, R.string.title_pro_invalid, Toast.LENGTH_LONG).show();
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
} else {
|
||||
if ("cid".equals(uri.getScheme()))
|
||||
|
@ -3236,7 +3236,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:unseen");
|
||||
}
|
||||
|
@ -3288,7 +3288,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:hide");
|
||||
}
|
||||
|
@ -3364,7 +3364,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:share");
|
||||
}
|
||||
|
@ -3416,7 +3416,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:keywords");
|
||||
}
|
||||
|
@ -3475,7 +3475,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:share");
|
||||
}
|
||||
|
@ -3539,7 +3539,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:headers");
|
||||
} else
|
||||
|
@ -3576,7 +3576,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "message:raw");
|
||||
}
|
||||
|
@ -4442,7 +4442,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, getArguments(), "view:image");
|
||||
|
||||
|
@ -4527,7 +4527,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(getContext(), getActivity(), args, "message:keywords:manage");
|
||||
}
|
||||
|
@ -4591,7 +4591,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(getContext(), getActivity(), args, "message:keyword:add");
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "operation:open:folder");
|
||||
} else {
|
||||
|
@ -171,7 +171,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "operation:open:message");
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "operation:delete");
|
||||
}
|
||||
|
|
|
@ -255,7 +255,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "rule:enable");
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "rule:execute");
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, owner, args, "rule:execute");
|
||||
}
|
||||
|
|
|
@ -502,12 +502,12 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||
} catch (IOException ex) {
|
||||
if (ex.getCause() instanceof MessagingException) {
|
||||
Log.w(browsable.name + " boundary server", ex);
|
||||
db.folder().setFolderError(browsable.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(browsable.id, Log.formatThrowable(ex));
|
||||
} else
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
Log.e(browsable.name + " boundary server", ex);
|
||||
db.folder().setFolderError(browsable.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(browsable.id, Log.formatThrowable(ex));
|
||||
} finally {
|
||||
((IMAPMessage) isub[j]).invalidateHeaders();
|
||||
}
|
||||
|
|
|
@ -379,23 +379,23 @@ class Core {
|
|||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(folder.name, ex);
|
||||
EntityLog.log(context, folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
EntityLog.log(context, folder.name + " " + Log.formatThrowable(ex, false));
|
||||
|
||||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
db.operation().setOperationError(op.id, Helper.formatThrowable(ex));
|
||||
db.operation().setOperationError(op.id, Log.formatThrowable(ex));
|
||||
for (EntityOperation s : similar.keySet())
|
||||
db.operation().setOperationError(s.id, Helper.formatThrowable(ex));
|
||||
db.operation().setOperationError(s.id, Log.formatThrowable(ex));
|
||||
|
||||
if (message != null && !(ex instanceof IllegalArgumentException)) {
|
||||
db.message().setMessageError(message.id, Helper.formatThrowable(ex));
|
||||
db.message().setMessageError(message.id, Log.formatThrowable(ex));
|
||||
for (EntityMessage m : similar.values())
|
||||
db.message().setMessageError(m.id, Helper.formatThrowable(ex));
|
||||
db.message().setMessageError(m.id, Log.formatThrowable(ex));
|
||||
}
|
||||
|
||||
if (similar.size() > 0 && !(ex instanceof IllegalArgumentException))
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
|
@ -1566,7 +1566,7 @@ class Core {
|
|||
updateContactInfo(context, folder, message);
|
||||
|
||||
} catch (Throwable ex) {
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
} finally {
|
||||
((POP3Message) imessage).invalidate(true);
|
||||
}
|
||||
|
@ -1723,8 +1723,8 @@ class Core {
|
|||
Log.w(folder.name, ex);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(folder.name, ex);
|
||||
EntityLog.log(context, folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
EntityLog.log(context, folder.name + " " + Log.formatThrowable(ex, false));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
}
|
||||
|
||||
if (uids.size() > 0) {
|
||||
|
@ -1884,12 +1884,12 @@ class Core {
|
|||
} catch (IOException ex) {
|
||||
if (ex.getCause() instanceof MessagingException) {
|
||||
Log.w(folder.name, ex);
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
} else
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
Log.e(folder.name, ex);
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
} finally {
|
||||
// Free memory
|
||||
((IMAPMessage) isub[j]).invalidateHeaders();
|
||||
|
@ -2131,7 +2131,7 @@ class Core {
|
|||
message.warning = ex.getMessage();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(folder.name, ex);
|
||||
message.warning = Helper.formatThrowable(ex, false);
|
||||
message.warning = Log.formatThrowable(ex, false);
|
||||
}
|
||||
|
||||
if (message.total != null && message.total == 0)
|
||||
|
@ -2372,7 +2372,7 @@ class Core {
|
|||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
db.message().setMessageError(message.id, Helper.formatThrowable(ex));
|
||||
db.message().setMessageError(message.id, Log.formatThrowable(ex));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2546,7 +2546,7 @@ class Core {
|
|||
parts.downloadAttachment(context, attachment);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(folder.name, ex);
|
||||
db.attachment().setError(attachment.id, Helper.formatThrowable(ex, false));
|
||||
db.attachment().setError(attachment.id, Log.formatThrowable(ex, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3180,7 +3180,7 @@ class Core {
|
|||
new NotificationCompat.Builder(context, channel)
|
||||
.setSmallIcon(R.drawable.baseline_warning_white_24)
|
||||
.setContentTitle(context.getString(R.string.title_notification_failed, title))
|
||||
.setContentText(Helper.formatThrowable(ex, false))
|
||||
.setContentText(Log.formatThrowable(ex, false))
|
||||
.setContentIntent(pi)
|
||||
.setAutoCancel(false)
|
||||
.setShowWhen(true)
|
||||
|
@ -3190,7 +3190,7 @@ class Core {
|
|||
.setVisibility(NotificationCompat.VISIBILITY_SECRET);
|
||||
|
||||
builder.setStyle(new NotificationCompat.BigTextStyle()
|
||||
.bigText(Helper.formatThrowable(ex, "\n", false)));
|
||||
.bigText(Log.formatThrowable(ex, "\n", false)));
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
|
|
@ -631,7 +631,7 @@ public class EmailProvider {
|
|||
Log.i("Reachable " + address);
|
||||
return true;
|
||||
} catch (Throwable ex) {
|
||||
Log.i("Unreachable " + address + ": " + Helper.formatThrowable(ex));
|
||||
Log.i("Unreachable " + address + ": " + Log.formatThrowable(ex));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -145,8 +145,8 @@ public class EntityAttachment {
|
|||
Helper.copy(source, target);
|
||||
} catch (IOException ex) {
|
||||
Log.e(ex);
|
||||
db.attachment().setError(aid, Helper.formatThrowable(ex, false));
|
||||
db.attachment().setError(attachment.id, Helper.formatThrowable(ex, false));
|
||||
db.attachment().setError(aid, Log.formatThrowable(ex, false));
|
||||
db.attachment().setError(attachment.id, Log.formatThrowable(ex, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException || ex instanceof UnknownHostException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "account:config");
|
||||
}
|
||||
|
@ -1142,7 +1142,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
}
|
||||
|
||||
private void showError(Throwable ex) {
|
||||
tvError.setText(Helper.formatThrowable(ex, false));
|
||||
tvError.setText(Log.formatThrowable(ex, false));
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
final EmailProvider provider = (EmailProvider) spProvider.getSelectedItem();
|
||||
|
@ -1268,7 +1268,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentAccount.this, new Bundle(), "account:primary");
|
||||
} else {
|
||||
|
@ -1319,7 +1319,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentAccount.this, args, "account:folders");
|
||||
}
|
||||
|
@ -1327,7 +1327,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "account:get");
|
||||
}
|
||||
|
@ -1433,7 +1433,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "account:delete");
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ public class FragmentAccounts extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentAccounts.this, args, "account:drafts");
|
||||
|
||||
|
@ -357,7 +357,7 @@ public class FragmentAccounts extends FragmentBase {
|
|||
} else if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folders:refresh");
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ public class FragmentAnswer extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "answer:get");
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ public class FragmentAnswer extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "answer:save");
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ public class FragmentAnswer extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "answer:delete");
|
||||
}
|
||||
|
|
|
@ -378,7 +378,7 @@ public class FragmentBase extends Fragment {
|
|||
if (ex instanceof IllegalArgumentException || ex instanceof FileNotFoundException)
|
||||
ToastEx.makeText(getContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "attachment:save");
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ public class FragmentBase extends Fragment {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "attachments:save");
|
||||
}
|
||||
|
|
|
@ -762,7 +762,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentCompose.this, args, "compose:convert");
|
||||
}
|
||||
|
@ -1072,7 +1072,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:encrypt");
|
||||
}
|
||||
|
@ -1293,7 +1293,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:alias");
|
||||
} else {
|
||||
|
@ -1333,7 +1333,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else {
|
||||
Log.e(ex);
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1500,7 +1500,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:picked");
|
||||
}
|
||||
|
@ -1570,7 +1570,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
else if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.toString(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:attachment:add");
|
||||
}
|
||||
|
@ -1870,7 +1870,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
null, 0, 0, 0, null);
|
||||
} catch (IntentSender.SendIntentException ex) {
|
||||
Log.e(ex);
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1882,7 +1882,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
Log.i(ex);
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
} else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:pgp");
|
||||
}
|
||||
|
@ -2111,7 +2111,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
});
|
||||
snackbar.show();
|
||||
} else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:s/mimem");
|
||||
}
|
||||
|
@ -2207,7 +2207,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:picked");
|
||||
}
|
||||
|
@ -2265,7 +2265,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "draft:get");
|
||||
|
||||
|
@ -2452,7 +2452,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
} catch (Throwable ex) {
|
||||
// Reset progress on failure
|
||||
Log.e(ex);
|
||||
db.attachment().setError(attachment.id, Helper.formatThrowable(ex, false));
|
||||
db.attachment().setError(attachment.id, Log.formatThrowable(ex, false));
|
||||
throw ex;
|
||||
}
|
||||
|
||||
|
@ -3178,7 +3178,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
});
|
||||
snackbar.show();
|
||||
} else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3643,7 +3643,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
ex instanceof AddressException || ex instanceof UnknownHostException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
|
||||
private String getActionName(int id) {
|
||||
|
@ -3849,7 +3849,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:show");
|
||||
}
|
||||
|
@ -3978,7 +3978,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "compose:answer");
|
||||
|
||||
|
@ -4080,7 +4080,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentDialogSend.this, args, "compose:plain_only");
|
||||
}
|
||||
|
@ -4109,7 +4109,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentDialogSend.this, args, "compose:receipt");
|
||||
}
|
||||
|
@ -4150,7 +4150,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentDialogSend.this, args, "compose:encrypt");
|
||||
}
|
||||
|
@ -4191,7 +4191,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentDialogSend.this, args, "compose:priority");
|
||||
}
|
||||
|
@ -4303,7 +4303,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "compose:snooze");
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ public class FragmentContacts extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(getContext(), getActivity(), new Bundle(), "contacts:delete");
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public class FragmentDialogFolder extends FragmentDialogBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:select");
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ public class FragmentDialogMarkdown extends FragmentDialogBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, getArguments(), "markdown:read");
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ public class FragmentFolder extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:get");
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ public class FragmentFolder extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:save");
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ public class FragmentFolder extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:delete");
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentFolders.this, new Bundle(), "folders:drafts");
|
||||
|
||||
|
@ -375,7 +375,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
} else if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folders:refresh");
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
} else if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:sync");
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
|
||||
@Override
|
||||
public void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:delete:local");
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:delete");
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentDialogApply.this, args, "folders:all");
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ public class FragmentGmail extends FragmentBase {
|
|||
onAuthorized(name, token);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
tvError.setText(Helper.formatThrowable(ex));
|
||||
tvError.setText(Log.formatThrowable(ex));
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
new Handler().post(new Runnable() {
|
||||
|
@ -403,7 +403,7 @@ public class FragmentGmail extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
tvError.setText(ex.getMessage());
|
||||
else
|
||||
tvError.setText(Helper.formatThrowable(ex));
|
||||
tvError.setText(Log.formatThrowable(ex));
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
new Handler().post(new Runnable() {
|
||||
|
|
|
@ -478,7 +478,7 @@ public class FragmentIdentity extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException || ex instanceof UnknownHostException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "identity:config");
|
||||
}
|
||||
|
@ -800,7 +800,7 @@ public class FragmentIdentity extends FragmentBase {
|
|||
}
|
||||
|
||||
private void showError(Throwable ex) {
|
||||
tvError.setText(Helper.formatThrowable(ex, false));
|
||||
tvError.setText(Log.formatThrowable(ex, false));
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
final EmailProvider provider = (EmailProvider) spProvider.getSelectedItem();
|
||||
|
@ -898,7 +898,7 @@ public class FragmentIdentity extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentIdentity.this, new Bundle(), "identity:count");
|
||||
} else {
|
||||
|
@ -989,14 +989,14 @@ public class FragmentIdentity extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentIdentity.this, args, "identity:accounts:get");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "identity:get");
|
||||
}
|
||||
|
@ -1106,7 +1106,7 @@ public class FragmentIdentity extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "identity:delete");
|
||||
}
|
||||
|
|
|
@ -734,7 +734,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "messages:move");
|
||||
}
|
||||
|
@ -822,7 +822,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "messages:drafts");
|
||||
|
||||
|
@ -908,7 +908,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(getContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "messages:search");
|
||||
}
|
||||
|
@ -1216,7 +1216,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
} else if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:refresh");
|
||||
}
|
||||
|
@ -1365,7 +1365,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "messages:move");
|
||||
}
|
||||
|
@ -1773,7 +1773,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "messages:swipe");
|
||||
}
|
||||
|
@ -1978,7 +1978,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:more");
|
||||
}
|
||||
|
@ -2034,7 +2034,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:seen");
|
||||
}
|
||||
|
@ -2120,7 +2120,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:flag");
|
||||
}
|
||||
|
@ -2167,7 +2167,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:flag");
|
||||
}
|
||||
|
@ -2236,7 +2236,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:delete:ask");
|
||||
}
|
||||
|
@ -2305,7 +2305,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:move");
|
||||
}
|
||||
|
@ -2369,7 +2369,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:move");
|
||||
}
|
||||
|
@ -2613,7 +2613,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:ignore");
|
||||
}
|
||||
|
@ -3125,7 +3125,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "search:reset");
|
||||
} else
|
||||
|
@ -3179,7 +3179,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else {
|
||||
Bundle args = new Bundle();
|
||||
args.putString("error", Helper.formatThrowable(ex, false));
|
||||
args.putString("error", Log.formatThrowable(ex, false));
|
||||
|
||||
FragmentDialogError fragment = new FragmentDialogError();
|
||||
fragment.setArguments(args);
|
||||
|
@ -3412,7 +3412,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.setLog(false).execute(this, args, "messages:navigation");
|
||||
}
|
||||
|
@ -3484,7 +3484,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.setLog(false).execute(this, args, "messages:expand");
|
||||
}
|
||||
|
@ -3551,7 +3551,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:navigate");
|
||||
}
|
||||
|
@ -3625,7 +3625,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:move");
|
||||
}
|
||||
|
@ -3693,7 +3693,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "messages:moveundo");
|
||||
}
|
||||
|
@ -3748,7 +3748,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:movehide");
|
||||
}
|
||||
|
@ -3953,7 +3953,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:alias");
|
||||
} else {
|
||||
|
@ -4149,7 +4149,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "raw:save");
|
||||
}
|
||||
|
@ -4355,7 +4355,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
REQUEST_OPENPGP,
|
||||
null, 0, 0, 0, null);
|
||||
} catch (IntentSender.SendIntentException ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4365,7 +4365,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
Log.i(ex);
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
} else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "decrypt:pgp");
|
||||
}
|
||||
|
@ -4624,11 +4624,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentMessages.this, args, "certificate:store");
|
||||
} catch (Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -4643,7 +4643,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "decrypt:s/mime");
|
||||
}
|
||||
|
@ -4699,7 +4699,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "message:delete");
|
||||
}
|
||||
|
@ -4734,7 +4734,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:delete:execute");
|
||||
}
|
||||
|
@ -4769,7 +4769,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "message:junk");
|
||||
}
|
||||
|
@ -4827,7 +4827,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "message:color");
|
||||
}
|
||||
|
@ -4875,7 +4875,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "message:snooze");
|
||||
}
|
||||
|
@ -4929,7 +4929,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "messages:snooze");
|
||||
}
|
||||
|
@ -4983,7 +4983,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "message:move");
|
||||
}
|
||||
|
@ -5121,7 +5121,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "message:print");
|
||||
}
|
||||
|
@ -5161,7 +5161,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "folder:delete");
|
||||
}
|
||||
|
@ -5314,7 +5314,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "messages:accounts");
|
||||
|
||||
|
@ -5409,7 +5409,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "identity:select");
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ public class FragmentOperations extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(getContext(), getActivity(), new Bundle(), "operations:delete");
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "cleanup:run");
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
|||
int maxKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength("AES");
|
||||
tvKeySize.setText(getString(R.string.title_advanced_aes_key_size, maxKeySize));
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
tvKeySize.setText(Helper.formatThrowable(ex));
|
||||
tvKeySize.setText(Log.formatThrowable(ex));
|
||||
}
|
||||
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
||||
|
|
|
@ -116,7 +116,7 @@ public class FragmentOrder extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "order:accounts");
|
||||
else if (TupleFolderSort.class.getName().equals(clazz))
|
||||
|
@ -142,7 +142,7 @@ public class FragmentOrder extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "order:folders");
|
||||
else
|
||||
|
@ -218,7 +218,7 @@ public class FragmentOrder extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "order:set");
|
||||
}
|
||||
|
|
|
@ -396,7 +396,7 @@ public class FragmentPop extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else {
|
||||
tvError.setText(Helper.formatThrowable(ex, false));
|
||||
tvError.setText(Log.formatThrowable(ex, false));
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
new Handler().post(new Runnable() {
|
||||
|
@ -466,7 +466,7 @@ public class FragmentPop extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentPop.this, new Bundle(), "account:primary");
|
||||
} else {
|
||||
|
@ -482,7 +482,7 @@ public class FragmentPop extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "account:get");
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ public class FragmentPop extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "account:delete");
|
||||
}
|
||||
|
|
|
@ -387,7 +387,7 @@ public class FragmentQuickSetup extends FragmentBase {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
tvError.setText(Helper.formatThrowable(ex, false));
|
||||
tvError.setText(Log.formatThrowable(ex, false));
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
if (args.containsKey("link")) {
|
||||
|
|
|
@ -490,7 +490,7 @@ public class FragmentRule extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "rule:accounts");
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ public class FragmentRule extends FragmentBase {
|
|||
etRecipient.setText(cursor.getString(0));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -586,7 +586,7 @@ public class FragmentRule extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "rule:delete");
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ public class FragmentRule extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, rargs, "rule:get");
|
||||
}
|
||||
|
@ -893,7 +893,7 @@ public class FragmentRule extends FragmentBase {
|
|||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "rule:save");
|
||||
} catch (JSONException ex) {
|
||||
|
@ -1143,7 +1143,7 @@ public class FragmentRule extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentDialogCheck.this, args, "rule:execute");
|
||||
}
|
||||
|
@ -1191,7 +1191,7 @@ public class FragmentRule extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "rule:check");
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ public class FragmentSetup extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "outbox:create");
|
||||
|
||||
|
@ -372,7 +372,7 @@ public class FragmentSetup extends FragmentBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(FragmentSetup.this, new Bundle(), "setup:drafts");
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package eu.faircode.email;
|
|||
*/
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.KeyguardManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
|
@ -80,14 +79,10 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
|||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.sun.mail.iap.BadCommandException;
|
||||
import com.sun.mail.iap.ConnectionException;
|
||||
import com.sun.mail.util.FolderClosedIOException;
|
||||
|
||||
import org.bouncycastle.asn1.x509.GeneralName;
|
||||
|
||||
|
@ -123,9 +118,6 @@ import java.util.concurrent.ThreadPoolExecutor;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.mail.FolderClosedException;
|
||||
import javax.mail.MessageRemovedException;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.security.auth.x500.X500Principal;
|
||||
|
||||
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
||||
|
@ -281,7 +273,7 @@ public class Helper {
|
|||
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri.toString()), Toast.LENGTH_LONG).show();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
ToastEx.makeText(context, Helper.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
ToastEx.makeText(context, Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -505,141 +497,6 @@ public class Helper {
|
|||
return name;
|
||||
}
|
||||
|
||||
static String formatThrowable(Throwable ex) {
|
||||
return formatThrowable(ex, true);
|
||||
}
|
||||
|
||||
static String formatThrowable(Throwable ex, boolean santize) {
|
||||
return formatThrowable(ex, " ", santize);
|
||||
}
|
||||
|
||||
static String formatThrowable(Throwable ex, String separator, boolean sanitize) {
|
||||
if (sanitize) {
|
||||
if (ex instanceof MessageRemovedException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof MessagingException &&
|
||||
ex.getCause() instanceof ConnectionException &&
|
||||
ex.getCause().getMessage() != null &&
|
||||
(ex.getCause().getMessage().contains("Read error") ||
|
||||
ex.getCause().getMessage().contains("Write error")))
|
||||
return null;
|
||||
|
||||
// javax.mail.MessagingException: AU3 BAD User is authenticated but not connected.;
|
||||
// nested exception is:
|
||||
// com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.
|
||||
// javax.mail.MessagingException: AU3 BAD User is authenticated but not connected.;
|
||||
// nested exception is:
|
||||
// com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.
|
||||
// at com.sun.mail.imap.IMAPFolder.logoutAndThrow(SourceFile:1156)
|
||||
// at com.sun.mail.imap.IMAPFolder.open(SourceFile:1063)
|
||||
// at com.sun.mail.imap.IMAPFolder.open(SourceFile:977)
|
||||
// at eu.faircode.email.ServiceSynchronize.monitorAccount(SourceFile:890)
|
||||
// at eu.faircode.email.ServiceSynchronize.access$1500(SourceFile:85)
|
||||
// at eu.faircode.email.ServiceSynchronize$7$1.run(SourceFile:627)
|
||||
// at java.lang.Thread.run(Thread.java:764)
|
||||
// Caused by: com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.
|
||||
// at com.sun.mail.iap.Protocol.handleResult(SourceFile:415)
|
||||
// at com.sun.mail.imap.protocol.IMAPProtocol.select(SourceFile:1230)
|
||||
// at com.sun.mail.imap.IMAPFolder.open(SourceFile:1034)
|
||||
|
||||
if (ex instanceof MessagingException &&
|
||||
ex.getCause() instanceof BadCommandException &&
|
||||
ex.getCause().getMessage() != null &&
|
||||
ex.getCause().getMessage().contains("User is authenticated but not connected"))
|
||||
return null;
|
||||
|
||||
if (ex instanceof IOException &&
|
||||
ex.getCause() instanceof MessageRemovedException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof ConnectionException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof FolderClosedException || ex instanceof FolderClosedIOException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof IllegalStateException &&
|
||||
("Not connected".equals(ex.getMessage()) ||
|
||||
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
|
||||
return null;
|
||||
|
||||
if (ex instanceof Core.AlertException)
|
||||
return ex.getMessage();
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(ex.toString());
|
||||
else
|
||||
sb.append(ex.getMessage() == null ? ex.getClass().getName() : ex.getMessage());
|
||||
|
||||
Throwable cause = ex.getCause();
|
||||
while (cause != null) {
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(separator).append(cause.toString());
|
||||
else
|
||||
sb.append(separator).append(cause.getMessage() == null ? cause.getClass().getName() : cause.getMessage());
|
||||
cause = cause.getCause();
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
static void unexpectedError(FragmentManager manager, Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("ex", ex);
|
||||
|
||||
FragmentDialogUnexpected fragment = new FragmentDialogUnexpected();
|
||||
fragment.setArguments(args);
|
||||
fragment.show(manager, "error:unexpected");
|
||||
}
|
||||
|
||||
public static class FragmentDialogUnexpected extends FragmentDialogBase {
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
final Throwable ex = (Throwable) getArguments().getSerializable("ex");
|
||||
|
||||
return new AlertDialog.Builder(getContext())
|
||||
.setTitle(R.string.title_unexpected_error)
|
||||
.setMessage(Helper.formatThrowable(ex, false))
|
||||
.setPositiveButton(android.R.string.cancel, null)
|
||||
.setNeutralButton(R.string.title_report, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
// Dialog will be dismissed
|
||||
final Context context = getContext();
|
||||
|
||||
new SimpleTask<Long>() {
|
||||
@Override
|
||||
protected Long onExecute(Context context, Bundle args) throws Throwable {
|
||||
return Log.getDebugInfo(context, R.string.title_crash_info_remark, ex, null).id;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Long id) {
|
||||
context.startActivity(new Intent(context, ActivityCompose.class)
|
||||
.putExtra("action", "edit")
|
||||
.putExtra("id", id));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(context, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
ToastEx.makeText(context, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.execute(getContext(), getActivity(), new Bundle(), "error:unexpected");
|
||||
}
|
||||
})
|
||||
.create();
|
||||
}
|
||||
}
|
||||
|
||||
static void linkPro(final TextView tv) {
|
||||
if (ActivityBilling.isPro(tv.getContext()) && !BuildConfig.DEBUG)
|
||||
hide(tv);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class HtmlHelper {
|
|||
Log.e(ex);
|
||||
Document document = Document.createShell("");
|
||||
Element strong = document.createElement("strong");
|
||||
strong.text(Helper.formatThrowable(ex));
|
||||
strong.text(Log.formatThrowable(ex));
|
||||
document.body().appendChild(strong);
|
||||
return document;
|
||||
}
|
||||
|
|
|
@ -20,8 +20,10 @@ package eu.faircode.email;
|
|||
*/
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.Dialog;
|
||||
import android.app.usage.UsageStatsManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
|
@ -41,8 +43,12 @@ import android.text.TextUtils;
|
|||
import android.view.Display;
|
||||
import android.view.OrientationEventListener;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.bugsnag.android.BeforeNotify;
|
||||
|
@ -54,7 +60,10 @@ import com.bugsnag.android.Client;
|
|||
import com.bugsnag.android.Error;
|
||||
import com.bugsnag.android.Report;
|
||||
import com.bugsnag.android.Severity;
|
||||
import com.sun.mail.iap.BadCommandException;
|
||||
import com.sun.mail.iap.ConnectionException;
|
||||
import com.sun.mail.iap.ProtocolException;
|
||||
import com.sun.mail.util.FolderClosedIOException;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
@ -82,6 +91,8 @@ import java.util.UUID;
|
|||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import javax.mail.Address;
|
||||
import javax.mail.FolderClosedException;
|
||||
import javax.mail.MessageRemovedException;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Part;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
|
@ -469,6 +480,87 @@ public class Log {
|
|||
return false;
|
||||
}
|
||||
|
||||
static String formatThrowable(Throwable ex) {
|
||||
return formatThrowable(ex, true);
|
||||
}
|
||||
|
||||
static String formatThrowable(Throwable ex, boolean santize) {
|
||||
return formatThrowable(ex, " ", santize);
|
||||
}
|
||||
|
||||
static String formatThrowable(Throwable ex, String separator, boolean sanitize) {
|
||||
if (sanitize) {
|
||||
if (ex instanceof MessageRemovedException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof MessagingException &&
|
||||
ex.getCause() instanceof ConnectionException &&
|
||||
ex.getCause().getMessage() != null &&
|
||||
(ex.getCause().getMessage().contains("Read error") ||
|
||||
ex.getCause().getMessage().contains("Write error")))
|
||||
return null;
|
||||
|
||||
// javax.mail.MessagingException: AU3 BAD User is authenticated but not connected.;
|
||||
// nested exception is:
|
||||
// com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.
|
||||
// javax.mail.MessagingException: AU3 BAD User is authenticated but not connected.;
|
||||
// nested exception is:
|
||||
// com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.
|
||||
// at com.sun.mail.imap.IMAPFolder.logoutAndThrow(SourceFile:1156)
|
||||
// at com.sun.mail.imap.IMAPFolder.open(SourceFile:1063)
|
||||
// at com.sun.mail.imap.IMAPFolder.open(SourceFile:977)
|
||||
// at eu.faircode.email.ServiceSynchronize.monitorAccount(SourceFile:890)
|
||||
// at eu.faircode.email.ServiceSynchronize.access$1500(SourceFile:85)
|
||||
// at eu.faircode.email.ServiceSynchronize$7$1.run(SourceFile:627)
|
||||
// at java.lang.Thread.run(Thread.java:764)
|
||||
// Caused by: com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.
|
||||
// at com.sun.mail.iap.Protocol.handleResult(SourceFile:415)
|
||||
// at com.sun.mail.imap.protocol.IMAPProtocol.select(SourceFile:1230)
|
||||
// at com.sun.mail.imap.IMAPFolder.open(SourceFile:1034)
|
||||
|
||||
if (ex instanceof MessagingException &&
|
||||
ex.getCause() instanceof BadCommandException &&
|
||||
ex.getCause().getMessage() != null &&
|
||||
ex.getCause().getMessage().contains("User is authenticated but not connected"))
|
||||
return null;
|
||||
|
||||
if (ex instanceof IOException &&
|
||||
ex.getCause() instanceof MessageRemovedException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof ConnectionException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof FolderClosedException || ex instanceof FolderClosedIOException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof IllegalStateException &&
|
||||
("Not connected".equals(ex.getMessage()) ||
|
||||
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
|
||||
return null;
|
||||
|
||||
if (ex instanceof Core.AlertException)
|
||||
return ex.getMessage();
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(ex.toString());
|
||||
else
|
||||
sb.append(ex.getMessage() == null ? ex.getClass().getName() : ex.getMessage());
|
||||
|
||||
Throwable cause = ex.getCause();
|
||||
while (cause != null) {
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(separator).append(cause.toString());
|
||||
else
|
||||
sb.append(separator).append(cause.getMessage() == null ? cause.getClass().getName() : cause.getMessage());
|
||||
cause = cause.getCause();
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
static void writeCrashLog(Context context, Throwable ex) {
|
||||
File file = new File(context.getCacheDir(), "crash.log");
|
||||
Log.w("Writing exception to " + file);
|
||||
|
@ -540,6 +632,60 @@ public class Log {
|
|||
return draft;
|
||||
}
|
||||
|
||||
static void unexpectedError(FragmentManager manager, Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("ex", ex);
|
||||
|
||||
FragmentDialogUnexpected fragment = new FragmentDialogUnexpected();
|
||||
fragment.setArguments(args);
|
||||
fragment.show(manager, "error:unexpected");
|
||||
}
|
||||
|
||||
public static class FragmentDialogUnexpected extends FragmentDialogBase {
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
final Throwable ex = (Throwable) getArguments().getSerializable("ex");
|
||||
|
||||
return new AlertDialog.Builder(getContext())
|
||||
.setTitle(R.string.title_unexpected_error)
|
||||
.setMessage(Log.formatThrowable(ex, false))
|
||||
.setPositiveButton(android.R.string.cancel, null)
|
||||
.setNeutralButton(R.string.title_report, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
// Dialog will be dismissed
|
||||
final Context context = getContext();
|
||||
|
||||
new SimpleTask<Long>() {
|
||||
@Override
|
||||
protected Long onExecute(Context context, Bundle args) throws Throwable {
|
||||
return Log.getDebugInfo(context, R.string.title_crash_info_remark, ex, null).id;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Long id) {
|
||||
context.startActivity(new Intent(context, ActivityCompose.class)
|
||||
.putExtra("action", "edit")
|
||||
.putExtra("id", id));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
if (ex instanceof IllegalArgumentException)
|
||||
ToastEx.makeText(context, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else
|
||||
ToastEx.makeText(context, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.execute(getContext(), getActivity(), new Bundle(), "error:unexpected");
|
||||
}
|
||||
})
|
||||
.create();
|
||||
}
|
||||
}
|
||||
|
||||
private static StringBuilder getAppInfo(Context context) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
@ -831,7 +977,6 @@ public class Log {
|
|||
return bytes.length;
|
||||
}
|
||||
|
||||
|
||||
private static long getFreeMem() {
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
long used = (rt.totalMemory() - rt.freeMemory());
|
||||
|
|
|
@ -1134,7 +1134,7 @@ public class MessageHelper {
|
|||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
warnings.add(Helper.formatThrowable(ex, false));
|
||||
warnings.add(Log.formatThrowable(ex, false));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ public class MessageHelper {
|
|||
}
|
||||
} catch (ParseException ex) {
|
||||
Log.w(ex);
|
||||
warnings.add(Helper.formatThrowable(ex, false));
|
||||
warnings.add(Log.formatThrowable(ex, false));
|
||||
}
|
||||
|
||||
if (part == plain)
|
||||
|
@ -1322,15 +1322,15 @@ public class MessageHelper {
|
|||
|
||||
Log.i("Downloaded attachment size=" + size);
|
||||
} catch (FolderClosedIOException ex) {
|
||||
db.attachment().setError(local.id, Helper.formatThrowable(ex));
|
||||
db.attachment().setError(local.id, Log.formatThrowable(ex));
|
||||
throw new FolderClosedException(ex.getFolder(), "downloadAttachment", ex);
|
||||
} catch (MessageRemovedIOException ex) {
|
||||
db.attachment().setError(local.id, Helper.formatThrowable(ex));
|
||||
db.attachment().setError(local.id, Log.formatThrowable(ex));
|
||||
throw new MessagingException("downloadAttachment", ex);
|
||||
} catch (Throwable ex) {
|
||||
// Reset progress on failure
|
||||
Log.e(ex);
|
||||
db.attachment().setError(local.id, Helper.formatThrowable(ex));
|
||||
db.attachment().setError(local.id, Log.formatThrowable(ex));
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
@ -1467,7 +1467,7 @@ public class MessageHelper {
|
|||
// Nested body: try to continue
|
||||
// ParseException: In parameter list boundary="...">, expected parameter name, got ";"
|
||||
Log.w(ex);
|
||||
parts.warnings.add(Helper.formatThrowable(ex, false));
|
||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||
}
|
||||
} else {
|
||||
// https://www.iana.org/assignments/cont-disp/cont-disp.xhtml
|
||||
|
@ -1478,7 +1478,7 @@ public class MessageHelper {
|
|||
disposition = disposition.toLowerCase(Locale.ROOT);
|
||||
} catch (MessagingException ex) {
|
||||
Log.w(ex);
|
||||
parts.warnings.add(Helper.formatThrowable(ex, false));
|
||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||
disposition = null;
|
||||
}
|
||||
|
||||
|
@ -1489,7 +1489,7 @@ public class MessageHelper {
|
|||
filename = decodeMime(filename);
|
||||
} catch (MessagingException ex) {
|
||||
Log.w(ex);
|
||||
parts.warnings.add(Helper.formatThrowable(ex, false));
|
||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||
filename = null;
|
||||
}
|
||||
|
||||
|
@ -1499,7 +1499,7 @@ public class MessageHelper {
|
|||
contentType = new ContentType(c == null ? "" : c);
|
||||
} catch (ParseException ex) {
|
||||
Log.w(ex);
|
||||
parts.warnings.add(Helper.formatThrowable(ex, false));
|
||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||
|
||||
if (part instanceof MimeMessage)
|
||||
contentType = new ContentType("text/html");
|
||||
|
@ -1528,7 +1528,7 @@ public class MessageHelper {
|
|||
} catch (MessagingException ex) {
|
||||
Log.w(ex);
|
||||
if (!"Failed to fetch headers".equals(ex.getMessage()))
|
||||
parts.warnings.add(Helper.formatThrowable(ex, false));
|
||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||
}
|
||||
|
||||
apart.attachment = new EntityAttachment();
|
||||
|
@ -1561,7 +1561,7 @@ public class MessageHelper {
|
|||
throw ex;
|
||||
} catch (MessagingException ex) {
|
||||
Log.w(ex);
|
||||
parts.warnings.add(Helper.formatThrowable(ex, false));
|
||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ public class SearchViewEx extends SearchView {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
ToastEx.makeText(getContext(), Helper.formatThrowable(ex), Toast.LENGTH_LONG).show();
|
||||
ToastEx.makeText(getContext(), Log.formatThrowable(ex), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.execute(getContext(), owner, args, "messages:suggestions");
|
||||
}
|
||||
|
|
|
@ -285,11 +285,11 @@ public class ServiceSend extends ServiceBase {
|
|||
db.operation().deleteOperation(op.id);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(outbox.name, ex);
|
||||
EntityLog.log(this, outbox.name + " " + Helper.formatThrowable(ex, false));
|
||||
EntityLog.log(this, outbox.name + " " + Log.formatThrowable(ex, false));
|
||||
|
||||
db.operation().setOperationError(op.id, Helper.formatThrowable(ex));
|
||||
db.operation().setOperationError(op.id, Log.formatThrowable(ex));
|
||||
if (message != null)
|
||||
db.message().setMessageError(message.id, Helper.formatThrowable(ex));
|
||||
db.message().setMessageError(message.id, Log.formatThrowable(ex));
|
||||
|
||||
if (ex instanceof OutOfMemoryError ||
|
||||
ex instanceof MessageRemovedException ||
|
||||
|
@ -314,7 +314,7 @@ public class ServiceSend extends ServiceBase {
|
|||
|
||||
} catch (Throwable ex) {
|
||||
Log.e(outbox.name, ex);
|
||||
db.folder().setFolderError(outbox.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(outbox.id, Log.formatThrowable(ex));
|
||||
} finally {
|
||||
db.folder().setFolderState(outbox.id, null);
|
||||
db.folder().setFolderSyncState(outbox.id, null);
|
||||
|
@ -478,7 +478,7 @@ public class ServiceSend extends ServiceBase {
|
|||
if (sid != null)
|
||||
db.message().deleteMessage(sid);
|
||||
|
||||
db.identity().setIdentityError(ident.id, Helper.formatThrowable(ex));
|
||||
db.identity().setIdentityError(ident.id, Log.formatThrowable(ex));
|
||||
|
||||
if (ex instanceof AuthenticationFailedException ||
|
||||
ex instanceof SendFailedException) {
|
||||
|
|
|
@ -783,7 +783,7 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.w(account.name + " alert: " + message);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this, account.name + " " +
|
||||
Helper.formatThrowable(new Core.AlertException(message), false));
|
||||
Log.formatThrowable(new Core.AlertException(message), false));
|
||||
db.account().setAccountError(account.id, message);
|
||||
|
||||
if (message != null && !message.startsWith("Too many simultaneous connections")) {
|
||||
|
@ -893,7 +893,7 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
} catch (MessagingException ex1) {
|
||||
Log.w(folder.name, ex1);
|
||||
db.folder().setFolderState(folder.id, null);
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex1));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex1));
|
||||
continue;
|
||||
}
|
||||
} catch (FolderNotFoundException ex) {
|
||||
|
@ -907,10 +907,10 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
if (ex.getCause() instanceof BadCommandException)
|
||||
throw ex;
|
||||
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
continue;
|
||||
} catch (Throwable ex) {
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
throw ex;
|
||||
}
|
||||
mapFolders.put(folder, ifolder);
|
||||
|
@ -939,7 +939,7 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.e(folder.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this,
|
||||
folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
folder.name + " " + Log.formatThrowable(ex, false));
|
||||
state.error(ex);
|
||||
} finally {
|
||||
wlMessage.release();
|
||||
|
@ -960,7 +960,7 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.e(folder.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this,
|
||||
folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
folder.name + " " + Log.formatThrowable(ex, false));
|
||||
state.error(ex);
|
||||
} finally {
|
||||
wlMessage.release();
|
||||
|
@ -984,7 +984,7 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.e(folder.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this,
|
||||
folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
folder.name + " " + Log.formatThrowable(ex, false));
|
||||
state.error(ex);
|
||||
} finally {
|
||||
wlMessage.release();
|
||||
|
@ -1006,7 +1006,7 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.e(folder.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this,
|
||||
folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
folder.name + " " + Log.formatThrowable(ex, false));
|
||||
state.error(new FolderClosedException(ifolder, "IDLE"));
|
||||
} finally {
|
||||
Log.i(folder.name + " end idle");
|
||||
|
@ -1092,8 +1092,8 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.e(folder.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this,
|
||||
folder.name + " " + Helper.formatThrowable(ex, false));
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
|
||||
folder.name + " " + Log.formatThrowable(ex, false));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
state.error(ex);
|
||||
} finally {
|
||||
if (shouldClose) {
|
||||
|
@ -1204,8 +1204,8 @@ public class ServiceSynchronize extends ServiceBase {
|
|||
Log.e(account.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSynchronize.this,
|
||||
account.name + " " + Helper.formatThrowable(ex, false));
|
||||
db.account().setAccountError(account.id, Helper.formatThrowable(ex));
|
||||
account.name + " " + Log.formatThrowable(ex, false));
|
||||
db.account().setAccountError(account.id, Log.formatThrowable(ex));
|
||||
} finally {
|
||||
// Stop watching for operations
|
||||
handler.post(new Runnable() {
|
||||
|
|
|
@ -100,7 +100,7 @@ public class Shortcuts {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
ToastEx.makeText(context, Helper.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
ToastEx.makeText(context, Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.execute(context, owner, new Bundle(), "shortcuts:update");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue