"mAccountSelectionListener must not be null.");
}
return AccountSelectionUtil.getSelectAccountDialog(this, resId,
- mAccountSelectionListener);
+ mAccountSelectionListener,
+ new CancelListener());
}
case R.id.dialog_searching_vcard: {
if (mProgressDialogForScanVCard == null) {
return getSelectAccountDialog(context, resId, onClickListener, null);
}
+ /**
+ * When OnClickListener or OnCancelListener is null, uses a default listener.
+ * The default OnCancelListener just closes itself with {@link Dialog#dismiss()}.
+ */
public static Dialog getSelectAccountDialog(Context context, int resId,
DialogInterface.OnClickListener onClickListener,
DialogInterface.OnCancelListener onCancelListener) {