diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index bc0231fb1d..2469dcf714 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -949,8 +949,8 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener { return getDataColumn(getApplicationContext(), contentUri, selection, selectionArgs); } - // Google Drive - else if (isGoogleDriveDocument(uri)) { + // Documents providers returned as content://... + else if (isAContentDocument(uri)) { return uri.toString(); } } @@ -1041,6 +1041,15 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener { return "com.google.android.apps.docs.storage".equals(uri.getAuthority()); } + /** + * + * @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