title: Android Close Activity After All Dialogs Are Dismissed
body: <p>I have an activity that I call with startActivityForResult and pass in extras with 2 values.
  These 2 values determine what functionality to run, for example the values are checked and methods such as 
  add a calendar event, create an alarm etc are called
  These methods display AlertDialogs allowing input</p>
  
  <p><strong>I want the activity to only return the intent once all these tasks have been completed and processed. I am not sure of how to check if the activity has completed</strong></p>
  
  <p>Is there a way to check if all Dialogs created by the activity are dismissed before closing the activity?</p>
  
  <p>Thank you.</p>