forked from upstream-mirrors/OpenTracks
Cleanup.
This commit is contained in:
@@ -61,10 +61,10 @@ public class SensorsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class ViewHolder extends RecyclerView.ViewHolder {
|
private class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
final TextView label;
|
private final TextView label;
|
||||||
final TextView sensorValue;
|
private final TextView sensorValue;
|
||||||
final TextView value;
|
private final TextView value;
|
||||||
final TextView unit;
|
private final TextView unit;
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|||||||
@@ -209,13 +209,6 @@ public class TrackDataHub {
|
|||||||
return selectedTrackId != null && selectedTrackId.equals(recordingStatus.getTrackId());
|
return selectedTrackId != null && selectedTrackId.equals(recordingStatus.getTrackId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the selected track is paused.
|
|
||||||
*/
|
|
||||||
public boolean isSelectedTrackPaused() {
|
|
||||||
return selectedTrackId != null && selectedTrackId.equals(recordingStatus.getTrackId()) && recordingStatus.isPaused();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads data for all listeners. To be run in the {@link #handler} thread.
|
* Loads data for all listeners. To be run in the {@link #handler} thread.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ public class Speed {
|
|||||||
return of(Float.parseFloat(speed_mps));
|
return of(Float.parseFloat(speed_mps));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Speed invalid() {
|
|
||||||
return of(Double.NaN);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Speed zero() {
|
public static Speed zero() {
|
||||||
return of(0.0);
|
return of(0.0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,12 +49,8 @@ public class ShareContentProvider extends CustomContentProvider {
|
|||||||
private static final String TAG = ShareContentProvider.class.getSimpleName();
|
private static final String TAG = ShareContentProvider.class.getSimpleName();
|
||||||
|
|
||||||
private static final int URI_GPX = 0;
|
private static final int URI_GPX = 0;
|
||||||
private static final int URI_KML_ONLY = 1;
|
|
||||||
private static final int URI_KML_WITH_TRACKDETAIL = 2;
|
|
||||||
private static final int URI_KML_WITH_TRACKDETAIL_SENSORDATA = 3;
|
private static final int URI_KML_WITH_TRACKDETAIL_SENSORDATA = 3;
|
||||||
|
|
||||||
private static final int URI_KMZ_ONLY_TRACK = 4;
|
|
||||||
private static final int URI_KMZ_WITH_TRACKDETAIL = 5;
|
|
||||||
private static final int URI_KMZ_WITH_TRACKDETAIL_AND_SENSORDATA = 6;
|
private static final int URI_KMZ_WITH_TRACKDETAIL_AND_SENSORDATA = 6;
|
||||||
private static final int URI_KMZ_WITH_TRACKDETAIL_SENSORDATA_AND_PICTURES = 7;
|
private static final int URI_KMZ_WITH_TRACKDETAIL_SENSORDATA_AND_PICTURES = 7;
|
||||||
|
|
||||||
|
|||||||
@@ -55,10 +55,6 @@ public class AltitudeSumManager implements SensorEventListener {
|
|||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isConnected() {
|
|
||||||
return isConnected;
|
|
||||||
}
|
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public void setConnected(boolean isConnected) {
|
public void setConnected(boolean isConnected) {
|
||||||
this.isConnected = isConnected;
|
this.isConnected = isConnected;
|
||||||
|
|||||||
@@ -236,7 +236,6 @@ public class TrackStatisticsUpdater {
|
|||||||
|
|
||||||
private void updateAbsoluteAltitude(double altitude) {
|
private void updateAbsoluteAltitude(double altitude) {
|
||||||
// Update altitude using the smoothed average
|
// Update altitude using the smoothed average
|
||||||
double oldAverage = altitudeBuffer_m.getAverage();
|
|
||||||
altitudeBuffer_m.setNext(altitude);
|
altitudeBuffer_m.setNext(altitude);
|
||||||
double newAverage = altitudeBuffer_m.getAverage();
|
double newAverage = altitudeBuffer_m.getAverage();
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ public class UnitConversions {
|
|||||||
// Distance //TODO Make private to Distance class!
|
// Distance //TODO Make private to Distance class!
|
||||||
// multiplication factor to convert miles to feet
|
// multiplication factor to convert miles to feet
|
||||||
private static final double MI_TO_FT = 5280.0;
|
private static final double MI_TO_FT = 5280.0;
|
||||||
// multiplication factor to convert feet to miles
|
|
||||||
public static final double FT_TO_MI = 1 / MI_TO_FT;
|
|
||||||
// multiplication factor to covert kilometers to meters
|
// multiplication factor to covert kilometers to meters
|
||||||
public static final double KM_TO_M = 1000.0;
|
public static final double KM_TO_M = 1000.0;
|
||||||
// multiplication factor to convert meters to kilometers
|
// multiplication factor to convert meters to kilometers
|
||||||
|
|||||||
Reference in New Issue
Block a user