Don't retry if the task was cancelled

This commit is contained in:
Lode Hoste 2015-04-12 23:24:11 +02:00
parent a447807ff6
commit 97bbeadc6a
1 changed files with 3 additions and 0 deletions

View File

@ -68,6 +68,9 @@ public class GetTask extends AsyncTask<String, Void, String> {
HttpGet get = new HttpGet(fullUri);
get.addHeader(new BasicHeader(RestApi.HEADER_API_KEY, params[2]));
if (isCancelled())
return null;
try {
Log.w(TAG, "Calling Rest API at " + fullUri);