Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 063f8500 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Method to show DialogFragment allowing state loss.

Same as show(), but allowing state loss.

Bug: 22867250
Change-Id: Ib779d8a3febc70ad47a9c1a9099d858707bad733
parent 9d142065
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -230,6 +230,15 @@ public class DialogFragment extends Fragment
        ft.commit();
    }

    /** {@hide} */
    public void showAllowingStateLoss(FragmentManager manager, String tag) {
        mDismissed = false;
        mShownByMe = true;
        FragmentTransaction ft = manager.beginTransaction();
        ft.add(this, tag);
        ft.commitAllowingStateLoss();
    }

    /**
     * Display the dialog, adding the fragment using an existing transaction
     * and then committing the transaction.