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();
|
final Bundle args = new Bundle();
|
||||||
args.putParcelable(ARG_CREDENTIAL, item);
|
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.setTargetFragment(target, /* requestCode */ -1);
|
||||||
frag.setArguments(args);
|
frag.setArguments(args);
|
||||||
frag.show(target.getFragmentManager(), TAG);
|
frag.show(target.getFragmentManager(), TAG);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
Reference in New Issue
Block a user