fixed getNameFromContentUri so it should always get the file name, if it is present
This commit is contained in:
parent
934d0e8ab9
commit
6ad8969824
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