Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fdcae4f authored by Tomasz Mikolajewski's avatar Tomasz Mikolajewski Committed by android-build-merger
Browse files

Merge "Exclude virtual files from ACTION_SEND." into nyc-dev

am: b56bc29

* commit 'b56bc29657c3de0d957ec01c1c8e959d7354ea2d':
  Exclude virtual files from ACTION_SEND.

Change-Id: I37029f399b59c7f2d72fb9fc68a3d60f1449a8c1
parents 9a0dbdc1 10fc8abd
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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);
                    }
                    }
                }
                }