The caller should decide whether to show the dialog or not. Utility function should avoid taking user-visible actions.