diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java b/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java index 98dd9cc0a..9f23515c6 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java @@ -21,7 +21,7 @@ import android.os.Bundle; /** * A fragment used to display the dialog. */ -/* package */ class AlertFragment extends DialogFragment implements DialogInterface.OnClickListener { +public class AlertFragment extends DialogFragment implements DialogInterface.OnClickListener { /* package */ static final String ARG_TITLE = "title"; /* package */ static final String ARG_MESSAGE = "message"; @@ -32,6 +32,10 @@ import android.os.Bundle; private final @Nullable DialogModule.AlertFragmentListener mListener; + public AlertFragment() { + mListener = null; + } + public AlertFragment(@Nullable DialogModule.AlertFragmentListener listener, Bundle arguments) { mListener = listener; setArguments(arguments); diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/SupportAlertFragment.java b/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/SupportAlertFragment.java index fb987cd05..f93c8afa7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/SupportAlertFragment.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/SupportAlertFragment.java @@ -21,10 +21,14 @@ import android.support.v4.app.DialogFragment; * {@link AlertFragment} for apps that use the Support FragmentActivity and FragmentManager * for legacy reasons. */ -/* package */ class SupportAlertFragment extends DialogFragment implements DialogInterface.OnClickListener { +public class SupportAlertFragment extends DialogFragment implements DialogInterface.OnClickListener { private final @Nullable DialogModule.AlertFragmentListener mListener; + public SupportAlertFragment() { + mListener = null; + } + public SupportAlertFragment(@Nullable DialogModule.AlertFragmentListener listener, Bundle arguments) { mListener = listener; setArguments(arguments);