Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-02-28 17:52:04 +01:00
commit 17130b8591
2 changed files with 13 additions and 4 deletions

View file

@ -95,6 +95,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
private OsmandApplication app;
private Drawable gpxNormal;
private Drawable gpxOnMap;
boolean running = false;
@Override
@ -115,9 +116,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
updateCurrentRecordingTrack.postDelayed(new Runnable() {
@Override
public void run() {
if (running) {
updateCurrentTrack(getView(), getActivity(), app);
if (getView() != null) {
startHandler();
}
}
@ -137,6 +137,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
updateCurrentTrack(getView(), getActivity(), app);
running = true;
startHandler();
}
@ -144,6 +145,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
public void onPause() {
super.onPause();
running = false;
if (operationTask != null) {
operationTask.cancel(true);
}

View file

@ -48,6 +48,7 @@ public class DashTrackFragment extends DashBaseFragment {
private Drawable gpxOnMap;
private Drawable gpxNormal;
private boolean previousRecordingState;
boolean running;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -80,9 +81,16 @@ public class DashTrackFragment extends DashBaseFragment {
return view;
}
@Override
public void onPause() {
super.onPause();
running = false;
}
@Override
public void onResume() {
super.onResume();
running = true;
setupGpxFiles();
}
@ -185,9 +193,8 @@ public class DashTrackFragment extends DashBaseFragment {
updateCurrentRecordingTrack.postDelayed(new Runnable() {
@Override
public void run() {
if (running) {
AvailableGPXFragment.updateCurrentTrack(v, getActivity(), getMyApplication());
if (v != null) {
startHandler(v);
}
}