Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/middleware/AsyncArrivalsSearcher.java
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | public class AsyncArrivalsSearcher extends AsyncTask<String, Fetcher.Result,Palina>{ | ||||
@Override | @Override | ||||
protected Palina doInBackground(String... params) { | protected Palina doInBackground(String... params) { | ||||
RecursionHelper<ArrivalsFetcher> r = new RecursionHelper<>(theFetchers); | RecursionHelper<ArrivalsFetcher> r = new RecursionHelper<>(theFetchers); | ||||
Palina resultPalina = null; | Palina resultPalina = null; | ||||
FragmentHelper fh = helperRef.get(); | FragmentHelper fh = helperRef.get(); | ||||
ArrayList<Fetcher.Result> results = new ArrayList<>(theFetchers.length); | ArrayList<Fetcher.Result> results = new ArrayList<>(theFetchers.length); | ||||
//If the FragmentHelper is null, that means the activity doesn't exist anymore | //If the FragmentHelper is null, that means the activity doesn't exist anymore | ||||
StringBuilder sb = new StringBuilder(); | |||||
for (ArrivalsFetcher f: theFetchers){ | |||||
sb.append(""); | |||||
sb.append(f.getClass().getSimpleName()); | |||||
sb.append("; "); | |||||
} | |||||
Log.d(DEBUG_TAG, "Using fetchers: "+sb.toString()); | |||||
if (fh == null){ | if (fh == null){ | ||||
return null; | return null; | ||||
} | } | ||||
//Log.d(TAG,"refresh layout reference is: "+fh.isRefreshLayoutReferenceTrue()); | //Log.d(TAG,"refresh layout reference is: "+fh.isRefreshLayoutReferenceTrue()); | ||||
while(r.valid()) { | while(r.valid()) { | ||||
if(this.isCancelled()) { | if(this.isCancelled()) { | ||||
return null; | return null; | ||||
▲ Show 20 Lines • Show All 240 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