InstantiationException on Orientation Change when DialogFragment is on the top
===

I have a `DialogFragment` defined as **inner** class in my `Fragment` class. On Orientation Change even the following exception is poped up: 

     Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment my.package.fragments.ImportFragment$FailedImportDialog: make sure class name exists, is public, and has an empty constructor that is public
            at android.app.Fragment.instantiate(Fragment.java:585)
            at android.app.FragmentState.instantiate(Fragment.java:96)
            at android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1682)
            at android.app.Activity.onCreate(Activity.java:861)
            at my.package.activities.ImportActivity.onCreate(ImportActivity.java:8)
            at android.app.Activity.performCreate(Activity.java:4465)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
            ... 12 more
            Caused by: java.lang.InstantiationException: can't instantiate class my.package.fragments.ImportFragment$FailedImportDialog; no empty constructor
            at java.lang.Class.newInstanceImpl(Native Method)
            at java.lang.Class.newInstance(Class.java:1319)
            at android.app.Fragment.instantiate(Fragment.java:574)

But I do have public constructor: 

    class FailedImportDialog extends DialogFragment {
    
            private EditText edtPassword;
            private Button button;
    
            public FailedImportDialog() { // Here it is!
            }
    
            @Override
            public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
                View v = inflater.inflate(R.layout.another_password_dialog, container, false);
                edtPassword = (EditText) v.findViewById(R.id.another_password_dialog_et_password);
    
                getDialog().setTitle(R.string.failed_to_decrypt);
    
                Button button = (Button) v.findViewById(R.id.another_password_dialog_btn_ok);
                button.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
    
                });
    
                return v;

        }
    }


Do you guys know why this exception happens? Thank you!