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

Commit dfd8ef3a authored by Aga Wronska's avatar Aga Wronska Committed by android-build-merger
Browse files

Merge "Display file names in Media libraries in grid mode" into nyc-dev

am: 8800f2d3

* commit '8800f2d3':
  Display file names in Media libraries in grid mode
parents f47a4ba6 8800f2d3
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -381,18 +381,6 @@ public final class DocumentsContract {
         */

        public static final int FLAG_ARCHIVE = 1 << 15;
        /**
         * Flag indicating that document titles should be hidden when viewing
         * this directory in a larger format grid. For example, a directory
         * containing only images may want the image thumbnails to speak for
         * themselves. Only valid when {@link #COLUMN_MIME_TYPE} is
         * {@link #MIME_TYPE_DIR}.
         *
         * @see #COLUMN_FLAGS
         * @see #FLAG_DIR_PREFERS_GRID
         * @hide
         */
        public static final int FLAG_DIR_HIDE_GRID_TITLES = 1 << 16;
    }

    /**
+0 −10
Original line number Diff line number Diff line
@@ -281,16 +281,6 @@ public class DirectoryFragment extends Fragment
        mTuner = FragmentTuner.pick(getContext(), state);
        mClipper = new DocumentClipper(context);

        boolean hideGridTitles;
        if (mType == TYPE_RECENT_OPEN) {
            // Hide titles when showing recents for picking images/videos
            hideGridTitles = MimePredicate.mimeMatches(
                    MimePredicate.VISUAL_MIMES, state.acceptMimes);
        } else {
            hideGridTitles = (mDocument != null) && mDocument.isGridTitlesHidden();
        }
        GridDocumentHolder.setHideTitles(hideGridTitles);

        final ActivityManager am = (ActivityManager) context.getSystemService(
                Context.ACTIVITY_SERVICE);
        boolean svelte = am.isLowRamDevice() && (mType == TYPE_RECENT_OPEN);
+0 −8
Original line number Diff line number Diff line
@@ -150,12 +150,4 @@ final class GridDocumentHolder extends DocumentHolder {
            mSize.setText(Formatter.formatFileSize(mContext, docSize));
        }
    }

    /**
     * Sets whether to hide titles on subsequently created GridDocumentHolder items.
     * @param hideTitles
     */
    public static void setHideTitles(boolean hideTitles) {
        mHideTitles = hideTitles;
    }
}
+0 −4
Original line number Diff line number Diff line
@@ -245,10 +245,6 @@ public class DocumentInfo implements Durable, Parcelable {
        return (flags & Document.FLAG_SUPPORTS_RENAME) != 0;
    }

    public boolean isGridTitlesHidden() {
        return (flags & Document.FLAG_DIR_HIDE_GRID_TITLES) != 0;
    }

    public boolean isArchive() {
        return (flags & Document.FLAG_ARCHIVE) != 0;
    }