forked from upstream-mirrors/OpenTracks
Removed calories and weight.
This commit is contained in:
-5
@@ -106,9 +106,4 @@ interface ITrackRecordingService {
|
||||
* return a Sensor.SensorState enum value.
|
||||
*/
|
||||
int getSensorState();
|
||||
|
||||
/**
|
||||
* Updates the calorie of current recording track.
|
||||
*/
|
||||
void updateCalorie();
|
||||
}
|
||||
|
||||
+1
-10
@@ -156,9 +156,6 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
if (!cursor.isNull(maxGradeIndex)) {
|
||||
tripStatistics.setMaxGrade(cursor.getFloat(maxGradeIndex));
|
||||
}
|
||||
if (!cursor.isNull(caloriesIndex)) {
|
||||
tripStatistics.setCalorie(cursor.getFloat(caloriesIndex));
|
||||
}
|
||||
if (!cursor.isNull(iconIndex)) {
|
||||
track.setIcon(cursor.getString(iconIndex));
|
||||
}
|
||||
@@ -322,8 +319,7 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
values.put(TracksColumns.MODIFIEDTIME, track.getModifiedTime());
|
||||
values.put(TracksColumns.SHAREDWITHME, track.isSharedWithMe());
|
||||
values.put(TracksColumns.SHAREDOWNER, track.getSharedOwner());
|
||||
values.put(TracksColumns.CALORIE, tripStatistics.getCalorie());
|
||||
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
@@ -474,10 +470,6 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
tripStatistics.setMaxGrade(cursor.getFloat(maxGradeIndex));
|
||||
hasTripStatistics = true;
|
||||
}
|
||||
if (!cursor.isNull(calorieIndex)) {
|
||||
tripStatistics.setCalorie(cursor.getFloat(calorieIndex));
|
||||
hasTripStatistics = true;
|
||||
}
|
||||
if (hasTripStatistics) {
|
||||
waypoint.setTripStatistics(tripStatistics);
|
||||
}
|
||||
@@ -710,7 +702,6 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
values.put(WaypointsColumns.ELEVATIONGAIN, tripStatistics.getTotalElevationGain());
|
||||
values.put(WaypointsColumns.MINGRADE, tripStatistics.getMinGrade());
|
||||
values.put(WaypointsColumns.MAXGRADE, tripStatistics.getMaxGrade());
|
||||
values.put(WaypointsColumns.CALORIE, tripStatistics.getCalorie());
|
||||
}
|
||||
|
||||
values.put(WaypointsColumns.PHOTOURL, waypoint.getPhotoUrl());
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public interface TracksColumns extends BaseColumns {
|
||||
|
||||
// The owner of the shared with me track
|
||||
String SHAREDOWNER = "sharedOwner";
|
||||
|
||||
|
||||
// Calorie burned of the track
|
||||
String CALORIE = "calorie";
|
||||
|
||||
|
||||
+2
-35
@@ -62,9 +62,6 @@ public class TripStatistics implements Parcelable {
|
||||
// The min and max grade seen on this trip.
|
||||
private final ExtremityMonitor gradeExtremities = new ExtremityMonitor();
|
||||
|
||||
// The calorie of current track.
|
||||
private double calorie = 0.0;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
@@ -89,7 +86,6 @@ public class TripStatistics implements Parcelable {
|
||||
other.elevationExtremities.getMin(), other.elevationExtremities.getMax());
|
||||
totalElevationGain = other.totalElevationGain;
|
||||
gradeExtremities.set(other.gradeExtremities.getMin(), other.gradeExtremities.getMax());
|
||||
calorie = other.calorie;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,7 +118,6 @@ public class TripStatistics implements Parcelable {
|
||||
gradeExtremities.update(other.gradeExtremities.getMin());
|
||||
gradeExtremities.update(other.gradeExtremities.getMax());
|
||||
}
|
||||
calorie += other.calorie;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -493,8 +488,7 @@ public class TripStatistics implements Parcelable {
|
||||
+ "; Max Longitude: " + getRightDegrees() + "; Max Speed: " + getMaxSpeed()
|
||||
+ "; Min Elevation: " + getMinElevation() + "; Max Elevation: " + getMaxElevation()
|
||||
+ "; Elevation Gain: " + getTotalElevationGain() + "; Min Grade: " + getMinGrade()
|
||||
+ "; Max Grade: " + getMaxGrade() + "; Calorie: " + getCalorie()
|
||||
+ "}";
|
||||
+ "; Max Grade: " + getMaxGrade() + "}";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -530,8 +524,7 @@ public class TripStatistics implements Parcelable {
|
||||
double minGrade = source.readDouble();
|
||||
double maxGrade = source.readDouble();
|
||||
data.gradeExtremities.set(minGrade, maxGrade);
|
||||
|
||||
data.calorie = source.readDouble();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -568,31 +561,5 @@ public class TripStatistics implements Parcelable {
|
||||
dest.writeDouble(totalElevationGain);
|
||||
dest.writeDouble(gradeExtremities.getMin());
|
||||
dest.writeDouble(gradeExtremities.getMax());
|
||||
dest.writeDouble(calorie);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds calorie value.
|
||||
*
|
||||
* @param calorieAdded add the value to the total calorie
|
||||
*/
|
||||
public void addCalorie(double calorieAdded) {
|
||||
calorie += calorieAdded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets calorie value.
|
||||
*
|
||||
* @param calorie the new value of calorie
|
||||
*/
|
||||
public void setCalorie(double calorie) {
|
||||
this.calorie = calorie;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets calorie value.
|
||||
*/
|
||||
public double getCalorie() {
|
||||
return calorie;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user