From abc7555b826f1efde176e16402dfc272df88dcfd Mon Sep 17 00:00:00 2001 From: misaochan Date: Sat, 2 Jan 2016 18:41:04 +1300 Subject: [PATCH] Back to solving repeat calls bug --- .../java/fr/free/nrw/commons/upload/MwVolleyApi.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java b/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java index a5a1a8b5f..ffdcb3199 100644 --- a/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java +++ b/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java @@ -29,7 +29,7 @@ public class MwVolleyApi { private static RequestQueue REQUEST_QUEUE; private static final Gson GSON = new GsonBuilder().create(); private Context context; - private String coordsLog; + private static String coordsLog; protected static Set categorySet; @@ -48,7 +48,7 @@ public class MwVolleyApi { * Example URL: https://commons.wikimedia.org/w/api.php?action=query&prop=categories|coordinates|pageprops&format=json&clshow=!hidden&coprop=type|name|dim|country|region|globe&codistancefrompoint=38.11386944444445|13.356263888888888& * generator=geosearch&redirects=&ggscoord=38.11386944444445|13.356263888888888&ggsradius=100&ggslimit=10&ggsnamespace=6&ggsprop=type|name|dim|country|region|globe&ggsprimary=all&formatversion=2 */ - private String buildUrl(int ggsradius) { + private static String buildUrl(int ggsradius) { Uri.Builder builder = Uri.parse(MWURL).buildUpon(); @@ -86,7 +86,6 @@ public class MwVolleyApi { } - private synchronized RequestQueue getQueue() { return getQueue(context); } @@ -112,10 +111,11 @@ public class MwVolleyApi { String apiUrl = buildUrl(radius); Log.d("Repeat", "URL: " + apiUrl); Log.d("Repeat", "Repeating API call with radius " + Integer.toString(radius)); + //request(); //JsonRequest request = new QueryRequest(apiUrl, new LogResponseListener(), new LogResponseErrorListener()); - //getQueue().add(request); + //MwVolleyApi.getQueue(context).add(request); if (categorySet.size() >= 10) { break; @@ -255,7 +255,7 @@ public class MwVolleyApi { } } } -} +