|
|
@ -2619,16 +2619,22 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
protected void onException(Bundle args, Throwable ex) {
|
|
|
|
protected void onException(Bundle args, Throwable ex) {
|
|
|
|
if (ex instanceof IllegalArgumentException) {
|
|
|
|
if (ex instanceof IllegalArgumentException) {
|
|
|
|
Log.i(ex);
|
|
|
|
Log.i(ex);
|
|
|
|
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG);
|
|
|
|
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_INDEFINITE);
|
|
|
|
if (ex.getCause() instanceof CertificateException)
|
|
|
|
snackbar.setAction(R.string.title_fix, new View.OnClickListener() {
|
|
|
|
snackbar.setAction(R.string.title_fix, new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
|
if (ex.getCause() instanceof CertificateException)
|
|
|
|
startActivity(
|
|
|
|
startActivity(
|
|
|
|
new Intent(getContext(), ActivitySetup.class)
|
|
|
|
new Intent(getContext(), ActivitySetup.class)
|
|
|
|
.putExtra("tab", "encryption"));
|
|
|
|
.putExtra("tab", "encryption"));
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
FragmentDialogSend fragment = new FragmentDialogSend();
|
|
|
|
|
|
|
|
fragment.setArguments(args);
|
|
|
|
|
|
|
|
fragment.setTargetFragment(FragmentCompose.this, REQUEST_SEND);
|
|
|
|
|
|
|
|
fragment.show(getParentFragmentManager(), "compose:send");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
snackbar.show();
|
|
|
|
snackbar.show();
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
Log.unexpectedError(getParentFragmentManager(), ex);
|
|
|
|
Log.unexpectedError(getParentFragmentManager(), ex);
|
|
|
|