Avoiding hung of UI application due to AsyncTask