Merge "Display file names in Media libraries in grid mode" into nyc-dev
am: 8800f2d314
* commit '8800f2d314793b3a97d27b96c0d2faef9e2efbd1':
Display file names in Media libraries in grid mode
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user