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

Commit f7a2a3ff authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6488512 from 1c88a156 to sc-d1-release

Change-Id: I6a5ad454078e2bed99d5fc7941fd44801d240453
parents 787106c0 1c88a156
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -27,11 +27,17 @@ 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;