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

Commit 865ea7c8 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Handle volumes without visible paths.

Transient volumes like USB drives are not mounted as visible, so we
shouldn't be kicking off media scanner for them.

Bug: 22545248
Change-Id: Ic8f2d3134f1edb8b2a12e8ff283eceeeb230f48b
parent eda1cc50
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,11 @@ public class ExternalStorageProvider extends DocumentsProvider {
                if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
                if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
                    root.flags |= Root.FLAG_HAS_SETTINGS;
                    root.flags |= Root.FLAG_HAS_SETTINGS;
                }
                }
                if (volume.isVisibleForRead(userId)) {
                    root.visiblePath = volume.getPathForUser(userId);
                    root.visiblePath = volume.getPathForUser(userId);
                } else {
                    root.visiblePath = null;
                }
                root.path = volume.getInternalPathForUser(userId);
                root.path = volume.getInternalPathForUser(userId);
                root.docId = getDocIdForFile(root.path);
                root.docId = getDocIdForFile(root.path);