From 89a966b1496b4fb920f644550f47534c6d7770b2 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 17 Jul 2018 13:39:08 +0300 Subject: [PATCH] remove temp directory --- OsmAnd-java/src/main/java/net/osmand/IndexConstants.java | 1 - OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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); }