135 |
|
|
136 |
class TimetableFetcher extends AsyncTask<String,Void,Void> { |
class TimetableFetcher extends AsyncTask<String,Void,Void> { |
137 |
|
|
|
boolean success; |
|
138 |
|
|
139 |
@Override |
@Override |
140 |
protected void onPostExecute(Void result) { |
protected void onPostExecute(Void result) { |
142 |
dismissDialog(DLG_PROGRESS); |
dismissDialog(DLG_PROGRESS); |
143 |
|
|
144 |
|
|
145 |
if (success) { |
if (timetables != null) { |
146 |
TimetableList.this.getListView().invalidateViews(); |
TimetableList.this.getListView().invalidateViews(); |
147 |
adapter.setTimetable(timetables); |
adapter.setTimetable(timetables); |
148 |
if (timetables.size() == 0) { |
if (timetables.size() == 0) { |
180 |
protected Void doInBackground(String... arg0) { |
protected Void doInBackground(String... arg0) { |
181 |
String type = arg0[0]; |
String type = arg0[0]; |
182 |
String trainID = arg0[1]; |
String trainID = arg0[1]; |
183 |
success = provider.lookupTimetable(type, trainID); |
timetables = provider.lookupTimetable(type, trainID); |
|
timetables = provider.getTimetable(type, trainID); |
|
184 |
|
|
185 |
return null; |
return null; |
186 |
} |
} |