Code refactor. Remove DynamicSpeedTrackPathDescriptor's dependency on selected_track_id_key.

This commit is contained in:
Jimmy Shih
2013-05-29 11:06:23 -07:00
parent 55861ecf0e
commit aafe93b723
9 changed files with 36 additions and 45 deletions
@@ -426,9 +426,10 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
if (isResumed()) {
getActivity().runOnUiThread(new Runnable() {
public void run() {
if (isResumed() && googleMap != null) {
boolean hasStartMarker = mapOverlay.update(googleMap, paths, reloadPaths);
if (isResumed() && googleMap != null && currentTrack != null) {
boolean hasStartMarker = mapOverlay.update(
googleMap, paths, currentTrack.getTripStatistics(), reloadPaths);
/*
* If has the start marker, then don't need to reload the paths each
* time
@@ -436,11 +437,11 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
if (hasStartMarker) {
reloadPaths = false;
}
if (lastTrackPoint != null && isSelectedTrackRecording()) {
boolean firstLocation = setCurrentLocation(lastTrackPoint);
if (firstLocation) {
keepCurrentLocationVisible = true;
keepCurrentLocationVisible = true;
}
updateCurrentLocation(firstLocation);
setWarningMessage(true);
@@ -470,8 +471,8 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
if (isResumed()) {
getActivity().runOnUiThread(new Runnable() {
public void run() {
if (isResumed() && googleMap != null) {
mapOverlay.update(googleMap, paths, true);
if (isResumed() && googleMap != null && currentTrack != null) {
mapOverlay.update(googleMap, paths, currentTrack.getTripStatistics(), true);
}
}
});