1) I launch a background task (via AsyncTask)

```
new FindJourneyTask().execute(); // FindJourneyTask extends AsyncTask

```

2) Still in the main thread (just before new thread is launched) I create a dialog with showDialog(dialogId)

```
// this method is in FindJourneyTask
protected void onPreExecute() {
    showDialog(DIALOG_FINDING_JOURNEY);
}

```

3) Screen orientation changes and the Activity is recreated

4) How can I now dismiss the dialog from the FindJourneyTask? Calling dismissDialog(dialogId) does nothing.

```
// this method is in FindJourneyTask
protected void onPostExecute(FindJourneyResult result) {
    dismissDialog(DIALOG_FINDING_JOURNEY); // does nothing
}

```