Added animation state to recovery action.

Also added a call to auto close the dialog before the animation starts.