From 89c6a627564ee1ac00a1a1030ae2412d035b542c Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Thu, 2 Mar 2017 15:17:45 +0300 Subject: [PATCH] Fix #3531 --- OsmAnd/src/net/osmand/plus/GPXDatabase.java | 3 ++- OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index c32bbe9eae..f6c11bdfcc 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -210,7 +210,8 @@ public class GPXDatabase { } private String getFileDir(File itemFile) { - return itemFile.getParentFile().equals(context.getAppPath(IndexConstants.GPX_INDEX_DIR)) ? + return itemFile.getParentFile() == null || + itemFile.getParentFile().equals(context.getAppPath(IndexConstants.GPX_INDEX_DIR)) ? "" : itemFile.getParentFile().getName(); } diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index a48de8d33b..623b1e836b 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -1014,7 +1014,7 @@ public class GpxUiHelper { return (int)value + " " + mainUnitY; } }); - + List values = new ArrayList<>(); List elevationData = analysis.elevationData; float nextX = 0;