Using AlertDialog.setOnDismissListener() instead of AlertDialog.Builder's

Signed-off-by: Umair Khan <omerjerk@gmail.com>