Skip to content

Commit 06d8d38

Browse files
committed
bug fix
1 parent 65ca79c commit 06d8d38

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ POM_DEVELOPER_NAME=sunwei
2121
POM_LICENCE_URL=http\://www.apache.org/licenses/LICENSE-2.0.txt
2222
POM_DESCRIPTION=Android image file selector
2323
POM_LICENCE_NAME=The Apache Software License, Version 2.0
24-
VERSION_NAME=1.0.16
24+
VERSION_NAME=1.0.17-SNAPSHOT
2525
VERSION_CODE=20
2626
POM_SCM_DEV_CONNECTION=scm\:https\://github.com/sw926/ImageFileSelector.git
2727
POM_URL=https\://github.com/sw926/ImageFileSelector

library/src/main/java/com/sw926/imagefileselector/Compatibility.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ else if (isMediaDocument(uri)) {
8181
else if ("content".equalsIgnoreCase(uri.getScheme())) {
8282

8383
// Return the remote address
84-
if (isGooglePhotosUri(uri))
84+
if (isGooglePhotosUri(uri)) {
8585
return uri.getLastPathSegment();
86+
}
8687

8788
return getDataColumn(context, uri, null, null);
8889
}
@@ -120,9 +121,13 @@ public static String getDataColumn(Context context, Uri uri, String selection,
120121
final int index = cursor.getColumnIndexOrThrow(column);
121122
return cursor.getString(index);
122123
}
124+
} catch (Throwable e) {
125+
e.printStackTrace();
123126
} finally {
124-
if (cursor != null)
127+
128+
if (cursor != null) {
125129
cursor.close();
130+
}
126131
}
127132
return null;
128133
}

0 commit comments

Comments
 (0)