forked from upstream-mirrors/OpenTracks
Cleanup using AndroidStudio's code analyzer.
This commit is contained in:
@@ -137,9 +137,9 @@ public class TrackDeleteService extends Service {
|
||||
}
|
||||
|
||||
public static class DeleteStatus {
|
||||
private int progress;
|
||||
private int max;
|
||||
private Track.Id trackId;
|
||||
private final int progress;
|
||||
private final int max;
|
||||
private final Track.Id trackId;
|
||||
|
||||
/**
|
||||
* @param trackId Track.Id just deleted if any.
|
||||
|
||||
@@ -240,20 +240,6 @@ public class TrackRecordingService extends Service implements HandlerServer.Hand
|
||||
return trackStatisticsUpdater.getTrackStatistics();
|
||||
}
|
||||
|
||||
//TODO Throw exception, when not recording.
|
||||
public Duration getTotalTime() {
|
||||
if (trackStatisticsUpdater == null) {
|
||||
return Duration.ofSeconds(0);
|
||||
}
|
||||
if (isPaused()) {
|
||||
return trackStatisticsUpdater.getTrackStatistics().getTotalTime();
|
||||
}
|
||||
|
||||
TrackStatistics statistics = trackStatisticsUpdater.getTrackStatistics();
|
||||
return Duration.between(statistics.getStopTime(), Instant.now())
|
||||
.plus(statistics.getTotalTime());
|
||||
}
|
||||
|
||||
public Marker.Id insertMarker(String name, String category, String description, String photoUrl) {
|
||||
if (!isRecording() || isPaused()) {
|
||||
return null;
|
||||
|
||||
@@ -10,8 +10,6 @@ import android.util.Log;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import de.dennisguse.opentracks.util.PressureSensorUtils;
|
||||
|
||||
/**
|
||||
@@ -21,8 +19,6 @@ public class AltitudeSumManager implements SensorEventListener {
|
||||
|
||||
private static final String TAG = AltitudeSumManager.class.getSimpleName();
|
||||
|
||||
private static final Duration SAMPLING_RATE = Duration.ofSeconds(3);
|
||||
|
||||
private boolean isConnected = false;
|
||||
|
||||
private float lastAcceptedPressureValue_hPa;
|
||||
|
||||
Reference in New Issue
Block a user