diff options
Diffstat (limited to 'src/net/cbaines/suma/BusActivity.java')
-rw-r--r-- | src/net/cbaines/suma/BusActivity.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/net/cbaines/suma/BusActivity.java b/src/net/cbaines/suma/BusActivity.java index 1659c88..532b2ca 100644 --- a/src/net/cbaines/suma/BusActivity.java +++ b/src/net/cbaines/suma/BusActivity.java @@ -2,7 +2,6 @@ package net.cbaines.suma; import java.io.IOException; import java.sql.SQLException; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -54,7 +53,6 @@ public class BusActivity extends ToastHelperActivity implements Preferences { // BusStops and if they are being updated by the handler List<BusStop> busStops; - ArrayList<Integer> busStopRoutePositions; private HashMap<Integer, GetTimetableStopTask> tasks = new HashMap<Integer, GetTimetableStopTask>(); @@ -103,7 +101,7 @@ public class BusActivity extends ToastHelperActivity implements Preferences { // Log.i(TAG, "Bus id is not null (" + bus.id + // ") setting busIDTextView"); busRoute = getHelper().getBusRouteDao().queryForId(busRouteID); - busIDTextView.setText(busID + " " + busRoute.label); + busIDTextView.setText(busID + " " + busRoute.code); // if (bus.destinationString != null) { // // Log.i(TAG, "Bus destination string is " + @@ -118,10 +116,6 @@ public class BusActivity extends ToastHelperActivity implements Preferences { // } busStops = busRoute.getRouteBusStops(this); - busStopRoutePositions = new ArrayList<Integer>(); - for (int i = 0; i < busStops.size(); i++) { - busStopRoutePositions.add(i); - } // Log.i(TAG, "Got " + busStops.size() + " bus stops for this bus"); refreshData = new Runnable() { @@ -268,7 +262,7 @@ public class BusActivity extends ToastHelperActivity implements Preferences { try { // Log.i(TAG, "Fetching stop for busStop " + busStop.description); - stop = DataManager.getStop(instance, busID, busRoute, busStopRoutePositions.get(busStopIndex)); + stop = DataManager.getStop(instance, busID, busRoute, busStopIndex); if (stop == null) { stop = new Stop(null, busStop, null, new Date(System.currentTimeMillis()), false); } @@ -291,7 +285,8 @@ public class BusActivity extends ToastHelperActivity implements Preferences { } protected void onPostExecute(Stop stop) { - if (isCancelled()) return; + if (isCancelled()) + return; synchronized (timetable) { timetable.set(busStopIndex, stop); |