|
@@ -59,6 +59,14 @@ public class PathResolver {
|
59
|
59
|
|
60
|
60
|
return getDataColumn(context, contentUri, selection, selectionArgs);
|
61
|
61
|
}
|
|
62
|
+ else if ("content".equalsIgnoreCase(uri.getScheme())) {
|
|
63
|
+
|
|
64
|
+ // Return the remote address
|
|
65
|
+ if (isGooglePhotosUri(uri))
|
|
66
|
+ return uri.getLastPathSegment();
|
|
67
|
+
|
|
68
|
+ return getDataColumn(context, uri, null, null);
|
|
69
|
+ }
|
62
|
70
|
}
|
63
|
71
|
// MediaStore (and general)
|
64
|
72
|
else if ("content".equalsIgnoreCase(uri.getScheme())) {
|
|
@@ -103,7 +111,12 @@ public class PathResolver {
|
103
|
111
|
final int index = cursor.getColumnIndexOrThrow(column);
|
104
|
112
|
return cursor.getString(index);
|
105
|
113
|
}
|
106
|
|
- } finally {
|
|
114
|
+ }
|
|
115
|
+ catch (Exception ex) {
|
|
116
|
+ ex.printStackTrace();
|
|
117
|
+ return null;
|
|
118
|
+ }
|
|
119
|
+ finally {
|
107
|
120
|
if (cursor != null)
|
108
|
121
|
cursor.close();
|
109
|
122
|
}
|