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:
cketti 2013-04-02 02:30:07 +02:00
parent 9d7eae252e
commit 002e3dd538
1 changed files with 4 additions and 0 deletions

View File

@ -768,6 +768,10 @@ public class MessageViewFragment extends SherlockFragment implements OnClickList
private void removeDialog(int dialogId) {
FragmentManager fm = getFragmentManager();
if (isRemoving() || isDetached()) {
return;
}
// 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
// never be dismissed.