forked from upstream-mirrors/OpenTracks
Add support for pause and resume in TrackRecordingService.
This commit is contained in:
@@ -23,6 +23,8 @@ limitations under the License.
|
||||
|
||||
<!-- Broadcast notification Intent constants -->
|
||||
<string name="track_started_broadcast_action">com.google.android.apps.mytracks.TRACK_STARTED</string>
|
||||
<string name="track_paused_broadcast_action">com.google.android.apps.mytracks.TRACK_PAUSED</string>
|
||||
<string name="track_resumed_broadcast_action">com.google.android.apps.mytracks.TRACK_RESUMED</string>
|
||||
<string name="track_stopped_broadcast_action">com.google.android.apps.mytracks.TRACK_STOPPED</string>
|
||||
<!-- Next API refactor depricate track_id_broadcast_extra and rename it to remove the broadcast as it is used when SHARING tracks as -->
|
||||
<string name="track_id_broadcast_extra">com.google.android.apps.mytracks.TRACK_ID</string>
|
||||
|
||||
@@ -101,16 +101,24 @@ public class TripStatistics implements Parcelable {
|
||||
totalDistance += other.totalDistance;
|
||||
totalTime += other.totalTime;
|
||||
movingTime += other.movingTime;
|
||||
latitudeExtremities.update(other.latitudeExtremities.getMin());
|
||||
latitudeExtremities.update(other.latitudeExtremities.getMax());
|
||||
longitudeExtremities.update(other.longitudeExtremities.getMin());
|
||||
longitudeExtremities.update(other.longitudeExtremities.getMax());
|
||||
if (other.latitudeExtremities.hasData()) {
|
||||
latitudeExtremities.update(other.latitudeExtremities.getMin());
|
||||
latitudeExtremities.update(other.latitudeExtremities.getMax());
|
||||
}
|
||||
if (other.longitudeExtremities.hasData()) {
|
||||
longitudeExtremities.update(other.longitudeExtremities.getMin());
|
||||
longitudeExtremities.update(other.longitudeExtremities.getMax());
|
||||
}
|
||||
maxSpeed = Math.max(maxSpeed, other.maxSpeed);
|
||||
elevationExtremities.update(other.elevationExtremities.getMin());
|
||||
elevationExtremities.update(other.elevationExtremities.getMax());
|
||||
if (other.elevationExtremities.hasData()) {
|
||||
elevationExtremities.update(other.elevationExtremities.getMin());
|
||||
elevationExtremities.update(other.elevationExtremities.getMax());
|
||||
}
|
||||
totalElevationGain += other.totalElevationGain;
|
||||
gradeExtremities.update(other.gradeExtremities.getMin());
|
||||
gradeExtremities.update(other.gradeExtremities.getMax());
|
||||
if (other.gradeExtremities.hasData()) {
|
||||
gradeExtremities.update(other.gradeExtremities.getMin());
|
||||
gradeExtremities.update(other.gradeExtremities.getMax());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user