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

Commit 9b4d2c9a authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Ignore home root from ExternalStorageProvider for Q am: 0e3146f1 am:...

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

Change-Id: I107042ad939ccf3d8cd800e4a372e584fbdb619c
parents 927dcb74 48b87f7e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -298,6 +298,16 @@ public class RootInfo implements Durable, Parcelable, Comparable<RootInfo> {
        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() {
        return Providers.AUTHORITY_STORAGE.equals(authority);
    }
+3 −1
Original line number Diff line number Diff line
@@ -308,7 +308,9 @@ public class RootsFragment extends Fragment {
        for (final RootInfo root : roots) {
            final RootItem item;

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