Code cleanup via Android Studio analyze.

Notably change: TrackPoint's copy constructor missed to copy the elevationGain.
This commit is contained in:
Dennis Guse
2020-09-20 18:46:05 +02:00
parent bd13535d3c
commit 0dfd31a308
5 changed files with 4 additions and 10 deletions
@@ -72,7 +72,7 @@ public class IntervalStatisticsAdapter extends ArrayAdapter<IntervalStatistics.I
*/
public enum StackMode {
STACK_FROM_BOTTOM,
STACK_FROM_TOP;
STACK_FROM_TOP
}
private static class ViewHolder {
@@ -165,10 +165,6 @@ public final class Marker {
this.id = id;
}
public Id(@NonNull String id) {
this(Long.parseLong(id));
}
//TOOD Limit visibility to TrackRecordingService / ContentProvider
public long getId() {
return id;
@@ -118,10 +118,6 @@ public class Track {
this.id = id;
}
public Id(@NonNull String id) {
this(Long.parseLong(id));
}
//TOOD Limit visibility to TrackRecordingService / ContentProvider
public long getId() {
return id;
@@ -48,6 +48,8 @@ public class TrackPoint {
this.heartRate_bpm = trackPoint.getHeartRate_bpm();
this.cyclingCadence_rpm = trackPoint.getCyclingCadence_rpm();
this.power = trackPoint.getPower();
this.elevationGain = trackPoint.getElevationGain();
}
public TrackPoint(double latitude, double longitude, Double altitude, long time) {
@@ -102,7 +102,7 @@ class GpsStatus {
* It look for GPS changes in lastLocation if it's not null. If it's null then look for in lastValidLocation if any.
*/
public void onLocationChanged(final Location location) {
if (checking == true) {
if (checking) {
return;
}