From 6ad8969824c9f7f7cf617d2a6e24c95efaebcc1b Mon Sep 17 00:00:00 2001 From: jensMF Date: Tue, 5 Nov 2019 14:42:25 +0100 Subject: [PATCH] fixed getNameFromContentUri so it should always get the file name, if it is present --- OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java index 2892980112..0c60fd8ceb 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java @@ -164,7 +164,7 @@ public class ImportHelper { private String getNameFromContentUri(Uri contentUri) { final String name; - final Cursor returnCursor = app.getContentResolver().query(contentUri, null, null, null, null); + final Cursor returnCursor = app.getContentResolver().query(contentUri, new String[] {OpenableColumns.DISPLAY_NAME}, null, null, null); if (returnCursor != null && returnCursor.moveToFirst()) { int columnIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME); if (columnIndex != -1) {