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

Commit 48b87f7e authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Ignore home root from ExternalStorageProvider for Q am: 0e3146f1 am: 24ee77cf am: 0e98f480

Change-Id: Ib3eafdd0f752481005596862313322a956ce6084
parents d9ab17e8 0e98f480
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -298,6 +298,16 @@ public class RootInfo implements Durable, Parcelable, Comparable<RootInfo> {
        return authority == null && rootId == null;
        return authority == null && rootId == null;
    }
    }


    /**
     * Return true, if the root is from ExternalStorage and the id is home. Otherwise, return false.
     */
    public boolean isExternalStorageHome() {
        // Note that "home" is the expected root id for the auto-created
        // user home directory on external storage. The "home" value should
        // match ExternalStorageProvider.ROOT_ID_HOME.
        return isExternalStorage() && "home".equals(rootId);
    }

    public boolean isExternalStorage() {
    public boolean isExternalStorage() {
        return Providers.AUTHORITY_STORAGE.equals(authority);
        return Providers.AUTHORITY_STORAGE.equals(authority);
    }
    }
+3 −1
Original line number Original line Diff line number Diff line
@@ -308,7 +308,9 @@ public class RootsFragment extends Fragment {
        for (final RootInfo root : roots) {
        for (final RootInfo root : roots) {
            final RootItem item;
            final RootItem item;


            if (root.isLibrary() || root.isDownloads()) {
            if (root.isExternalStorageHome()) {
                continue;
            } else if (root.isLibrary() || root.isDownloads()) {
                item = new RootItem(root, mActionHandler, maybeShowBadge);
                item = new RootItem(root, mActionHandler, maybeShowBadge);
                librariesBuilder.add(item);
                librariesBuilder.add(item);
            } else if (root.isStorage()) {
            } else if (root.isStorage()) {