Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IllegalStateException when showing error dialog in v1.7.8 #588

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import android.util.Pair;

import java.util.concurrent.Executor;
Expand Down Expand Up @@ -265,7 +267,11 @@ public void onCancel() {
});

// Show fragment
dialogFragment.show(fragmentManager, BiometricErrorDialogFragment.FRAGMENT_DEFAULT_TAG);
final FragmentTransaction ft = fragmentManager.beginTransaction();
ft.setReorderingAllowed(true);
ft.add(dialogFragment, BiometricErrorDialogFragment.FRAGMENT_DEFAULT_TAG);
// cannot commit() to avoid java.lang.IllegalStateException when onSaveInstanceState() was already called
ft.commitAllowingStateLoss();

return cancelableTask;
}
Expand Down
Loading