return getDataColumn(getApplicationContext(), contentUri, selection, selectionArgs);
}
- // Google Drive
- else if (isGoogleDriveDocument(uri)) {
+ // Documents providers returned as content://...
+ else if (isAContentDocument(uri)) {
return uri.toString();
}
}
}
/**
+ *
+ * @param uri The Uri to check.
+ * @return Whether the Uri is from a content provider as kind "content://..."
+ */
+ public static boolean isAContentDocument(Uri uri) {
+ return uri.toString().startsWith("content://");
+ }
+
+ /**
* Pushes a directory to the drop down list
* @param directory to push
* @throws IllegalArgumentException If the {@link OCFile#isFolder()} returns false.