Puts the refresh code into an AsyncTask

Also fixes an issue in the query

Change-Id: I3030fc9a0d271747d800c5f964172550b362d87d
1 file changed