Change the code style of SingleColorTrackPathPainterTest and DynamicSpeedTrackPathPainterTest.

This commit is contained in:
youtaol
2012-04-06 16:27:13 +08:00
parent 68f50ef6de
commit 28750142a9
4 changed files with 18 additions and 17 deletions
@@ -51,9 +51,9 @@ public class SingleColorTrackPathPainter implements TrackPathPainter {
@Override
public void updatePath(Projection projection, Rect viewRect, int startLocationIdx,
Boolean alwaysVisible, List<CachedLocation> points) {
Path newPath = new Path();
newPath.incReserve(points.size());
path = updatePath(projection, viewRect, startLocationIdx, alwaysVisible, points, newPath);
path = new Path();
path.incReserve(points.size());
updatePath(projection, viewRect, startLocationIdx, alwaysVisible, points, path);
}
@@ -68,7 +68,7 @@ public class SingleColorTrackPathPainter implements TrackPathPainter {
* @param newPath The path to be created.
*/
@VisibleForTesting
Path updatePath(Projection projection, Rect viewRect, int startLocationIdx,
void updatePath(Projection projection, Rect viewRect, int startLocationIdx,
Boolean alwaysVisible, List<CachedLocation> points, Path newPath) {
// Whether to start a new segment on new valid and visible point.
boolean newSegment = startLocationIdx <= 0 || !points.get(startLocationIdx - 1).valid;
@@ -103,7 +103,6 @@ public class SingleColorTrackPathPainter implements TrackPathPainter {
newPath.lineTo(pt.x, pt.y);
}
}
return newPath;
}
@Override