summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/DocumentsUI/src/com/android/documentsui/RootsCache.java')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/RootsCache.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
index d2267b1..27e8f20 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
@@ -367,6 +367,9 @@ public class RootsCache {
if (!state.showAdvanced && advanced) continue;
// Exclude non-local devices when local only
if (state.localOnly && !localOnly) continue;
+ // Exclude downloads roots that don't support directory creation
+ // TODO: Add flag to check the root supports directory creation or not.
+ if (state.directoryCopy && root.isDownloads()) continue;
// Only show empty roots when creating
if ((state.action != State.ACTION_CREATE ||
state.action != State.ACTION_OPEN_TREE ||