diff --git a/OsmAnd-java/src/main/java/net/osmand/IndexConstants.java b/OsmAnd-java/src/main/java/net/osmand/IndexConstants.java index 833989e471..a4f69ecbc7 100644 --- a/OsmAnd-java/src/main/java/net/osmand/IndexConstants.java +++ b/OsmAnd-java/src/main/java/net/osmand/IndexConstants.java @@ -48,7 +48,6 @@ public class IndexConstants { public static final String INDEX_DOWNLOAD_DOMAIN = "download.osmand.net"; public static final String APP_DIR = "osmand/"; //$NON-NLS-1$ public static final String MAPS_PATH = ""; - public static final String TEMP_DIR = "temp/"; public static final String BACKUP_INDEX_DIR= "backup/"; public static final String GPX_INDEX_DIR = "tracks/"; public static final String MAP_MARKERS_INDEX_DIR = "/map markers"; diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java index a749f0cd77..b0bd251679 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java @@ -1260,7 +1260,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements File dir; boolean shouldClearPath = false; if (gpx.path.isEmpty()) { - dir = app.getAppPath(IndexConstants.TEMP_DIR); + dir = app.getCacheDir(); shouldClearPath = true; } else { dir = app.getAppCustomization().getTracksDir(); @@ -1279,7 +1279,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements protected void onPostExecute(Boolean shouldClearPath) { TrackPointFragment fragment = fragmentRef.get(); if (gpx != null) { - if (fragment != null && fragment.getTrackActivity() != null) { + if (fragment != null && fragment.isResumed()) { fragment.hideProgressBar(); fragment.shareGpx(gpx.path); }