forked from organicmaps/organicmaps-tmp
[android] Fixed crash when try to get absolute path
This commit is contained in:
parent
bc3d8c4476
commit
41260225e6
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue