mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Modify kitkat document provider implementation in order to cover all 'content://' cases
This commit is contained in:
parent
903b66595f
commit
3cae3d3eb8
1 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue