Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Donskoy <donskdmitry@mail.ru>2018-08-21 19:20:54 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2018-08-22 19:56:21 +0300
commit41260225e6ee5970098ed40f0d0232b05a6300e0 (patch)
treed4316f7187933788da6f5e18cc4da40cbc13ab92 /android/src
parentbc3d8c4476265542fd5fb687c04e7540ae8d27c8 (diff)
[android] Fixed crash when try to get absolute path
Diffstat (limited to 'android/src')
-rw-r--r--android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java b/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java
index 1376703632..4d5165991f 100644
--- a/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java
+++ b/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java
@@ -89,7 +89,8 @@ public class SystemDownloadCompletedService extends JobIntentService
@Nullable
private static String getFilePath(@NonNull Cursor cursor) throws IOException
{
- return getColumnValue(cursor, DownloadManager.COLUMN_LOCAL_FILENAME);
+ String localUri = getColumnValue(cursor, DownloadManager.COLUMN_LOCAL_URI);
+ return localUri == null ? null : Uri.parse(localUri).getPath();
}
@Nullable