No progress indicator show on status bar after clicking `Background` button on `ProgressDialog`/Modal

Answered

Expected Behavior: I want to run a time consuming task in modal at first, but user can also send the task to run in background(with a progress indicator on the status bar) after clicking the `Backgroud` button. my code is pasted below. 

Actual Behavior: the modal(ProgressDialog) closed after clicking `Background` button, but the progress indicator does not show on status bar. and `processSentToBackground` is never called.

can you help me?
```

final Task.ConditionalModal task = new Task.ConditionalModal(project, "Test backgroundable", true, PerformInBackgroundOption.DEAF) {
@SneakyThrows
@Override
public void run(@NotNull final ProgressIndicator progressIndicator) {
Thread.sleep(300000);
}

@Override
public void processSentToBackground() {
System.out.println("processSentToBackground");
}
};
ProgressManager.getInstance().run(task);
```

Please sign in to leave a comment.