ignore exceptions raised by dialog.dismiss() to workaround crash (http://stackoverflow.com/questions/2745061/java-lang-illegalargumentexception-view-not-attached-to-window-manager)