I am displaying a DialogFragment and `onClickOK` event the AsyncTask is started. While AsyncTask is running I am showing ProgressBar. AsyncTask can finish with fail or fail. When it finish with success I would like to dismiss FragmentDialog. How can I do it with `FragmentManager`(?) ? I show it using `void show (FragmentManager manager, String tag)`.

P.S. Is there any reason to dismiss a FragmentDialog `onClickOK` and (perhaps) show it on finish AsyncTask?