Guard double-showing of user credentials dialog
Only create & show the dialogfragment if it does not already exist. Bug: 28058930 Change-Id: Ia48cc8a5fd60a12c3beb6c9263036a449cf8d67c
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user