Merge "Exclude virtual files from ACTION_SEND." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b56bc29657
@@ -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