forked from upstream-mirrors/OpenTracks
Cleanup.
This commit is contained in:
@@ -327,7 +327,7 @@ public class ChartView extends View {
|
||||
*
|
||||
* @param dataPoints an array of data points to be added
|
||||
*/
|
||||
public void addDataPoints(ArrayList<double[]> dataPoints) {
|
||||
public void addDataPoints(List<double[]> dataPoints) {
|
||||
synchronized (chartData) {
|
||||
chartData.addAll(dataPoints);
|
||||
for (double[] dataPoint : dataPoints) {
|
||||
|
||||
@@ -44,13 +44,16 @@ public class TrackDataHub implements DataSourceListener {
|
||||
* Target number of track points displayed by the map overlay.
|
||||
* We may display more than this number of points.
|
||||
*/
|
||||
@Deprecated
|
||||
private static final int TARGET_DISPLAYED_TRACK_POINTS = 5000;
|
||||
|
||||
/**
|
||||
* Maximum number of waypoints to displayed.
|
||||
*/
|
||||
@VisibleForTesting
|
||||
@Deprecated
|
||||
private static final int MAX_DISPLAYED_WAYPOINTS = 128;
|
||||
|
||||
private static final String TAG = TrackDataHub.class.getSimpleName();
|
||||
|
||||
private final Context context;
|
||||
|
||||
@@ -31,6 +31,7 @@ import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import de.dennisguse.opentracks.R;
|
||||
import de.dennisguse.opentracks.TrackDetailActivity;
|
||||
@@ -58,7 +59,7 @@ public abstract class ChartFragment extends Fragment implements TrackDataListene
|
||||
|
||||
private static final String STATE_CHART_VIEW_BY_DISTANCE_KEY = "chartViewByDistance";
|
||||
|
||||
private final ArrayList<double[]> pendingPoints = new ArrayList<>();
|
||||
private final List<double[]> pendingPoints = new ArrayList<>();
|
||||
|
||||
private TrackDataHub trackDataHub;
|
||||
|
||||
|
||||
@@ -904,15 +904,7 @@ public class TrackRecordingService extends Service {
|
||||
|
||||
@Override
|
||||
public SensorDataSet getSensorData() {
|
||||
if (trackRecordingService.remoteSensorManager == null) {
|
||||
Log.d(TAG, "remoteSensorManager is null.");
|
||||
return null;
|
||||
}
|
||||
if (trackRecordingService.getSensorDataSet() == null) {
|
||||
Log.d(TAG, "Sensor data set is null.");
|
||||
return null;
|
||||
}
|
||||
return trackRecordingService.remoteSensorManager.getSensorDataSet();
|
||||
return trackRecordingService.getSensorDataSet();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user