aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/DataManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/DataManager.java')
-rw-r--r--src/net/cbaines/suma/DataManager.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/cbaines/suma/DataManager.java b/src/net/cbaines/suma/DataManager.java
index 97ebb54..1658cb5 100644
--- a/src/net/cbaines/suma/DataManager.java
+++ b/src/net/cbaines/suma/DataManager.java
@@ -683,6 +683,7 @@ public class DataManager {
for (int stopNum = 0; stopNum < stopsArray.length(); stopNum++) {
JSONObject stopObj = stopsArray.getJSONObject(stopNum);
+ Log.v(TAG, stopObj.toString());
if (!keepNonUniLink && !stopObj.getString("name").startsWith("U")) {
// Log.v(TAG, "Skipping non uni-link stop " +
@@ -863,12 +864,12 @@ public class DataManager {
if (route.id == 326) { // U1
Log.i(TAG, "Direction for " + busStopRouteIndex + " is");
- if (busStopRouteIndex >= 0 && busStopRouteIndex <= 36) {
+ if (busStopRouteIndex >= 0 && busStopRouteIndex <= 35) {
direction = route.forwardDirection;
- } else if (busStopRouteIndex >= 50 && busStopRouteIndex <= 87) {
+ } else if (busStopRouteIndex >= 52 && busStopRouteIndex <= 87) {
direction = route.reverseDirection;
} else {
- Log.e(TAG, "For U1 route, error with busStopRouteIndex " + busStopRouteIndex);
+ Log.e(TAG, "For U1 route, error with busStopRouteIndex " + busStopRouteIndex + " " + busStop.description);
}
Log.i(TAG, direction);
} else if (route.id == 468) { // U1N
@@ -957,12 +958,13 @@ public class DataManager {
}
public static String getFileFromServer(String request) throws ClientProtocolException, IOException {
+ long requestStartTime = System.currentTimeMillis();
StringBuilder builder = new StringBuilder();
HttpClient client = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(request);
- // Log.v("Util.getFileFromServer", "Request used: " + request);
HttpResponse response = client.execute(httpGet);
+ Log.v("Util.getFileFromServer", request + " request took " + (System.currentTimeMillis() - requestStartTime));
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode == 200) {