mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
3185166d32
commit
8767aed899
|
@ -27,10 +27,10 @@ public class FragmentDialogEx extends DialogFragment {
|
||||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||||
try {
|
try {
|
||||||
super.show(manager, tag);
|
super.show(manager, tag);
|
||||||
} catch (IllegalStateException ex) {
|
} catch (Throwable ex) {
|
||||||
// Can not perform this action after onSaveInstanceState
|
// IllegalStateException Can not perform this action after onSaveInstanceState
|
||||||
// Should not happen, but still happened in AdapterMessage.onOpenLink
|
// Should not happen, but still happened in AdapterMessage.onOpenLink
|
||||||
Log.w(ex);
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,11 @@ public class PopupMenuLifecycle extends PopupMenu implements LifecycleObserver {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show() {
|
public void show() {
|
||||||
|
try {
|
||||||
super.show();
|
super.show();
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
|
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
|
||||||
|
|
Loading…
Reference in New Issue