Merge "Exclude virtual files from ACTION_SEND." into nyc-dev
am: b56bc29
* commit 'b56bc29657c3de0d957ec01c1c8e959d7354ea2d':
Exclude virtual files from ACTION_SEND.
Change-Id: I1d1742aacb8cc19a36d8cc9c89a0441dc4ac7a1c
This commit is contained in:
@@ -710,10 +710,10 @@ public class DirectoryFragment extends Fragment
|
|||||||
void onDocumentsReady(List<DocumentInfo> docs) {
|
void onDocumentsReady(List<DocumentInfo> docs) {
|
||||||
Intent intent;
|
Intent intent;
|
||||||
|
|
||||||
// Filter out directories - those can't be shared.
|
// Filter out directories and virtual files - those can't be shared.
|
||||||
List<DocumentInfo> docsForSend = new ArrayList<>();
|
List<DocumentInfo> docsForSend = new ArrayList<>();
|
||||||
for (DocumentInfo doc: docs) {
|
for (DocumentInfo doc: docs) {
|
||||||
if (!Document.MIME_TYPE_DIR.equals(doc.mimeType)) {
|
if (!doc.isDirectory() && !doc.isVirtualDocument()) {
|
||||||
docsForSend.add(doc);
|
docsForSend.add(doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user