aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/BusStopSpecificStopView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/BusStopSpecificStopView.java')
-rw-r--r--src/net/cbaines/suma/BusStopSpecificStopView.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/cbaines/suma/BusStopSpecificStopView.java b/src/net/cbaines/suma/BusStopSpecificStopView.java
index 635d2e8..2124308 100644
--- a/src/net/cbaines/suma/BusStopSpecificStopView.java
+++ b/src/net/cbaines/suma/BusStopSpecificStopView.java
@@ -112,7 +112,7 @@ public class BusStopSpecificStopView extends LinearLayout implements OnClickList
public void onClick(View v) {
Log.v(TAG, "onClick");
- if (stop.bus.id != null) {
+ if (stop.bus != null) {
Log.v(TAG, "stop.bus != null");
context.makeToast(onClickMessage, onClickHelpMessage, Toast.LENGTH_SHORT);
} else {
@@ -131,12 +131,13 @@ public class BusStopSpecificStopView extends LinearLayout implements OnClickList
Log.i("StopView", "Bus route " + stop.bus.route + " Uni-Link " + stop.bus.route.uniLink + " Bus ID " + stop.bus.id);
- if (stop.bus.id != null && stop.bus.route.uniLink) {
+ if (stop.bus != null && stop.bus.route.uniLink) {
Uri uri = Uri.parse("http://id.southampton.ac.uk/bus/" + stop.bus.id);
- Intent busStopIntent = new Intent(Intent.ACTION_VIEW, uri);
- busStopIntent.putExtra("busStopID", stop.busStop.id);
- context.startActivity(busStopIntent);
+ Intent busIntent = new Intent(Intent.ACTION_VIEW, uri);
+ busIntent.putExtra("busStopID", stop.busStop.id);
+ busIntent.putExtra("busRouteID", stop.bus.route.id);
+ context.startActivity(busIntent);
} else {
context.makeToast(onClickUnidentifiedMessage, Toast.LENGTH_SHORT);
}