Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
17130b8591
2 changed files with 13 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue