From d0f06828f7ea6cdc3fe668a98fb72d9e63baa79c Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 4 Dec 2014 10:40:13 +0100 Subject: [PATCH] SubjectAdder.downloadMissingImages(): Don't try if there is no network. We already ignore the exception in the caller, because it is normal, though we didn't actually throw the exception. The lack of a check here might have caused us to download missing images, though not new images, while not on wifi even while the wifi-only setting was on. --- .../com/murrayc/galaxyzoo/app/syncadapter/SubjectAdder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/murrayc/galaxyzoo/app/syncadapter/SubjectAdder.java b/app/src/main/java/com/murrayc/galaxyzoo/app/syncadapter/SubjectAdder.java index 46608644..4d3ef90e 100644 --- a/app/src/main/java/com/murrayc/galaxyzoo/app/syncadapter/SubjectAdder.java +++ b/app/src/main/java/com/murrayc/galaxyzoo/app/syncadapter/SubjectAdder.java @@ -63,6 +63,8 @@ public SubjectAdder(final Context context, final RequestQueue requestQueue) { boolean downloadMissingImages() { boolean noWorkNeeded = true; + throwIfNoNetwork(); + //Get all the items that have an image that is not yet fully downloaded: final ContentResolver resolver = getContext().getContentResolver();