remove unnecessary call to activity

This commit is contained in:
Chumva 2018-07-17 13:10:58 +03:00
parent 3ef000c7af
commit 15f4a6555e

View file

@ -1249,10 +1249,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
protected void onPreExecute() { protected void onPreExecute() {
TrackPointFragment fragment = fragmentRef.get(); TrackPointFragment fragment = fragmentRef.get();
if (fragment != null) { if (fragment != null) {
TrackActivity activity = fragment.getTrackActivity(); fragment.showProgressBar();
if (activity != null) {
activity.setSupportProgressBarIndeterminateVisibility(true);
}
} }
} }
@ -1283,6 +1280,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
TrackPointFragment fragment = fragmentRef.get(); TrackPointFragment fragment = fragmentRef.get();
if (gpx != null) { if (gpx != null) {
if (fragment != null && fragment.getTrackActivity() != null) { if (fragment != null && fragment.getTrackActivity() != null) {
fragment.hideProgressBar();
fragment.shareGpx(gpx.path); fragment.shareGpx(gpx.path);
} }
if (shouldClearPath) { if (shouldClearPath) {