mirror of
https://github.com/moparisthebest/k-9
synced 2024-08-13 17:03:48 -04:00
Avoid IllegalStateException
Reported for Kaiten: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState ... at android.support.v4.app.DialogFragment.dismiss
This commit is contained in:
parent
9d7eae252e
commit
002e3dd538
@ -768,6 +768,10 @@ public class MessageViewFragment extends SherlockFragment implements OnClickList
|
|||||||
private void removeDialog(int dialogId) {
|
private void removeDialog(int dialogId) {
|
||||||
FragmentManager fm = getFragmentManager();
|
FragmentManager fm = getFragmentManager();
|
||||||
|
|
||||||
|
if (isRemoving() || isDetached()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure the "show dialog" transaction has been processed when we call
|
// Make sure the "show dialog" transaction has been processed when we call
|
||||||
// findFragmentByTag() below. Otherwise the fragment won't be found and the dialog will
|
// findFragmentByTag() below. Otherwise the fragment won't be found and the dialog will
|
||||||
// never be dismissed.
|
// never be dismissed.
|
||||||
|
Loading…
Reference in New Issue
Block a user