aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/BusActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/BusActivity.java')
-rw-r--r--src/net/cbaines/suma/BusActivity.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/net/cbaines/suma/BusActivity.java b/src/net/cbaines/suma/BusActivity.java
index 834ce2f..724b65f 100644
--- a/src/net/cbaines/suma/BusActivity.java
+++ b/src/net/cbaines/suma/BusActivity.java
@@ -162,8 +162,9 @@ public class BusActivity extends ToastHelperActivity implements Preferences {
// Remove the old time from the timetable
synchronized (timetable) {
- timetable.set(num, new StopLoading(bus, busStops.get(num), null, new Date(
- System.currentTimeMillis() - 21000), false));
+ timetable.set(num,
+ new StopLoading(bus, busStops.get(num), null, new Date(
+ System.currentTimeMillis() - 21000), false));
displayTimetable(timetable);
}
@@ -282,7 +283,7 @@ public class BusActivity extends ToastHelperActivity implements Preferences {
}
private class GetTimetableStopTask extends AsyncTask<BusStop, Integer, Stop> {
- private String errorMessage;
+ // private String errorMessage;
private BusStop busStop;
@@ -305,16 +306,16 @@ public class BusActivity extends ToastHelperActivity implements Preferences {
}
Log.i(TAG, "Finished fetching stop for busStop " + position);
} catch (SQLException e) {
- errorMessage = "Error message regarding SQL?";
+ // errorMessage = "Error message regarding SQL?";
e.printStackTrace();
} catch (ClientProtocolException e) {
- errorMessage = "ClientProtocolException!?!";
+ // errorMessage = "ClientProtocolException!?!";
e.printStackTrace();
} catch (IOException e) {
- errorMessage = "Error fetching bus times from server, are you connected to the internet?";
+ // errorMessage = "Error fetching bus times from server, are you connected to the internet?";
e.printStackTrace();
} catch (JSONException e) {
- errorMessage = "Error parsing bus times";
+ // errorMessage = "Error parsing bus times";
e.printStackTrace();
}
return stop;
@@ -331,6 +332,11 @@ public class BusActivity extends ToastHelperActivity implements Preferences {
}
+ @Override
+ public Object onRetainNonConfigurationInstance() {
+ return timetable;
+ }
+
private void displayTimetable(Timetable timetable) {
visibleTimetable = (Timetable) timetable.clone();