Merge pull request #7862 from jensMF/fix_getNameFromContentUri
fixed getNameFromContentUri fixes #7624 and #6598
This commit is contained in:
commit
10098c9ae2
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ public class ImportHelper {
|
||||||
|
|
||||||
private String getNameFromContentUri(Uri contentUri) {
|
private String getNameFromContentUri(Uri contentUri) {
|
||||||
final String name;
|
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()) {
|
if (returnCursor != null && returnCursor.moveToFirst()) {
|
||||||
int columnIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
|
int columnIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
|
||||||
if (columnIndex != -1) {
|
if (columnIndex != -1) {
|
||||||
|
|
Loading…
Reference in a new issue