return;
}
final JSONArray trackPoints = activityData.getJSONArray("trackPoints");
List<LocationFacet> locationFacets = new ArrayList<LocationFacet>();
// timeZone is computed based on first location for each batch of trackPoints
Connector connector = Connector.getConnector("moves");
for (int i=0; i<trackPoints.size(); i++) {
JSONObject trackPoint = trackPoints.getJSONObject(i);
LocationFacet locationFacet = new LocationFacet(updateInfo.apiKey.getId());
locationFacet.latitude = (float) trackPoint.getDouble("lat");
locationFacet.longitude = (float) trackPoint.getDouble("lon");
// The two lines below would calculate the timezone if we cared, but the
// timestamps from Moves are already in GMT, so don't mess with the timezone
//if (timeZone==null)
// timeZone = metadataService.getTimeZone(locationFacet.latitude, locationFacet.longitude);
final DateTime time = localTimeStorageFormat.parseDateTime(trackPoint.getString("time"));
locationFacet.timestampMs = time.getMillis();
locationFacet.api = connector.value();
locationFacet.start = locationFacet.timestampMs;
locationFacet.end = locationFacet.timestampMs;
locationFacet.source = LocationFacet.Source.MOVES;
locationFacet.apiKeyId = updateInfo.apiKey.getId();
locationFacet.uri = activityId;