mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-13 12:26:45 +08:00
Fix [FB4A] DialogModule.showNewAlert
Summary: Check that the Fragment Manager has not called `onSaveInstanceState` before attempting to show the DialogFragment. See: https://developer.android.com/reference/android/support/v4/app/FragmentManager#isstatesaved Reviewed By: mdvacca Differential Revision: D13686425 fbshipit-source-id: 090a88aa6f892c961b1c49a2bffe603c38528b8a
This commit is contained in:
committed by
Facebook Github Bot
parent
b0db2d71b9
commit
b2459cc01c
@@ -129,7 +129,7 @@ public class DialogModule extends ReactContextBaseJavaModule implements Lifecycl
|
||||
|
||||
if (isUsingSupportLibrary()) {
|
||||
SupportAlertFragment alertFragment = new SupportAlertFragment(actionListener, arguments);
|
||||
if (isInForeground) {
|
||||
if (isInForeground && !mSupportFragmentManager.isStateSaved()) {
|
||||
if (arguments.containsKey(KEY_CANCELABLE)) {
|
||||
alertFragment.setCancelable(arguments.getBoolean(KEY_CANCELABLE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user