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

Commit 2620a5d3 authored by Diksha Gohlyan's avatar Diksha Gohlyan Committed by Automerger Merge Worker
Browse files

Merge "Revert "Enable manage mode for ExternalStorageProvider when called from...

Merge "Revert "Enable manage mode for ExternalStorageProvider when called from Files"" into rvc-dev am: fb4c0603 am: ee93842b am: 0486b475 am: 834a293c am: e5d4d6a7

Change-Id: I249319394616e60b917b365402b0c2df5326a4ab
parents 4b146090 e5d4d6a7
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -27,17 +27,11 @@ public final class Config extends ActivityConfig {

    @Override
    public boolean managedModeEnabled(DocumentStack stack) {
        // This method helps us understand when to kick in special manage mode behaviors.
        final RootInfo root = stack.getRoot();

        // When in Files activity, allow External Storage provider to view
        // Android/[data|obb|sandbox] directories which are otherwise hidden for privacy reasons.
        if (root != null && root.isExternalStorage()) {
            return true;
        }
        // When in downloads top level directory, we also show active downloads.
        // And while we don't allow folders in Downloads, we do allow Zip files in
        // downloads that themselves can be opened and viewed like directories.
        // This method helps us understand when to kick in on those special behaviors.
        final RootInfo root = stack.getRoot();
        return root != null
                && root.isDownloads()
                && stack.size() == 1;