Move synchronize out of AsyncTask