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

Commit f8e2dbf2 authored by Robin Lee's avatar Robin Lee
Browse files

Guard double-showing of user credentials dialog

Only create & show the dialogfragment if it does not already exist.

Bug: 28058930
Change-Id: Ia48cc8a5fd60a12c3beb6c9263036a449cf8d67c
parent 2de9313d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -104,11 +104,13 @@ public class UserCredentialsSettings extends OptionsMenuFragment implements OnIt
            final Bundle args = new Bundle();
            args.putParcelable(ARG_CREDENTIAL, item);

            final CredentialDialogFragment frag = new CredentialDialogFragment();
            if (target.getFragmentManager().findFragmentByTag(TAG) == null) {
                final DialogFragment frag = new CredentialDialogFragment();
                frag.setTargetFragment(target, /* requestCode */ -1);
                frag.setArguments(args);
                frag.show(target.getFragmentManager(), TAG);
            }
        }

        @Override
        public Dialog onCreateDialog(Bundle savedInstanceState) {