Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #4475 - Only wrap Telemetry longitude when it's outside bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
bleege committed Mar 25, 2016
1 parent d647508 commit 6eb0bb9
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,10 @@ protected Void doInBackground(Void... voids) {
if (evt.containsKey(MapboxEvent.KEY_LONGITUDE)) {
double lon = (double)evt.get(MapboxEvent.KEY_LONGITUDE);
Log.i(TAG, "Original Lon = " + lon);
lon = MathUtils.wrap(lon, GeoConstants.MIN_LONGITUDE, GeoConstants.MAX_LONGITUDE);
Log.i(TAG, "Wrapped Lon = " + lon);
if ((lon < GeoConstants.MIN_LONGITUDE) || (lon > GeoConstants.MAX_LONGITUDE)) {
lon = MathUtils.wrap(lon, GeoConstants.MIN_LONGITUDE, GeoConstants.MAX_LONGITUDE);
Log.i(TAG, "Wrapped Lon = " + lon);
}
jsonObject.put(MapboxEvent.KEY_LONGITUDE, lon);
}

Expand Down Expand Up @@ -640,7 +642,7 @@ protected Void doInBackground(Void... voids) {
.post(body)
.build();
Response response = client.newCall(request).execute();
Log.d(TAG, "response code = " + response.code() + " for events " + events.size());
Log.i(TAG, "response code = " + response.code() + " for events " + events.size());

// Reset Events
// ============
Expand Down

0 comments on commit 6eb0bb9

Please sign in to comment.