Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/backend/GTTJSONFetcher.java
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | public Palina ReadArrivalTimesAll(String stopID, AtomicReference<Result> res) { | ||||
return p; | return p; | ||||
} | } | ||||
try { | try { | ||||
// returns [{"PassaggiRT":[],"Passaggi":[]}] for non existing stops! | // returns [{"PassaggiRT":[],"Passaggi":[]}] for non existing stops! | ||||
json.getJSONObject(0).getString("Linea"); // if we can get this, then there's something useful in the array. | json.getJSONObject(0).getString("Linea"); // if we can get this, then there's something useful in the array. | ||||
} catch(JSONException e) { | } catch(JSONException e) { | ||||
Log.w(DEBUG_TAG, "No existing lines"); | Log.w(DEBUG_TAG, "No existing lines"); | ||||
res.set(Result.EMPTY_RESULT_SET); | res.set(Result.NOT_FOUND); | ||||
return p; | return p; | ||||
} | } | ||||
howManyRoutes = json.length(); | howManyRoutes = json.length(); | ||||
if(howManyRoutes == 0) { | if(howManyRoutes == 0) { | ||||
res.set(Result.EMPTY_RESULT_SET); | res.set(Result.EMPTY_RESULT_SET); | ||||
return p; | return p; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register