When you call the beginTask method, you specify -1 as the amount of work units.
When you finishes the task, use finished method to notify the progress dialog
that the task completes. The corresponding UI is show below:
The progress bar displays animation to indicate that work in progress.