Home | History | Annotate | Download | only in providers

Lines Matching refs:Folder

52  * A folder is a collection of conversations, and perhaps other folders.
55 public class Folder implements Parcelable, Comparable<Folder> {
64 // TODO: remove this once we figure out which folder is returning a "null" string as the
72 * Unique id of this folder.
77 * Persistent (across installations) id of this folder.
82 * The content provider URI that returns this folder for this account.
87 * The human visible name for this folder.
92 * The possible capabilities that this folder supports.
97 * Whether or not this folder has children folders.
109 * folder.
114 * The content provider URI to return the list of child folders of this folder.
119 * The number of messages that are unseen in this folder.
124 * The number of messages that are unread in this folder.
129 * The total number of messages in this folder.
134 * The content provider URI to force a refresh of this folder.
139 * The current sync status of the folder
152 * Folder type bit mask. 0 is default.
158 * Icon for this folder; 0 implies no icon.
163 * Notification icon for this folder; 0 implies no icon.
179 * The possibly empty name of this folder with full hierarchy.
185 * Parent folder of this folder, or null if there is none.
200 public static final Collection<Folder> EMPTY = Collections.emptyList();
229 public Folder build() {
230 return new Folder(mId, mPersistentId, mUri, mName, mCapabilities,
340 public Folder(int id, String persistentId, Uri uri, String name, int capabilities,
378 public Folder(Cursor cursor) {
414 // A null parent URI means that this is a top-level folder.
429 public static final CursorCreator<Folder> FACTORY = new CursorCreator<Folder>() {
431 public Folder createFromCursor(Cursor c) {
432 return new Folder(c);
437 return "Folder CursorCreator";
441 public Folder(Parcel in, ClassLoader loader) {
507 * Construct a folder that queries for search results. Do not call on the UI
510 public static ObjectCursorLoader<Folder> forSearchResults(Account account, String query,
518 return new ObjectCursorLoader<Folder>(context, searchUri, UIProvider.FOLDERS_PROJECTION,
524 public static HashMap<Uri, Folder> hashMapForFolders(List<Folder> rawFolders) {
525 final HashMap<Uri, Folder> folders = new HashMap<Uri, Folder>();
526 for (Folder f : rawFolders) {
535 private Folder() {
540 * Creates a new instance of a folder object that is <b>not</b> initialized. The caller is
542 * @return a new instance of an unsafe folder.
545 public static Folder newUnsafeInstance() {
546 return new Folder();
549 public static final ClassLoaderCreator<Folder> CREATOR = new ClassLoaderCreator<Folder>() {
551 public Folder createFromParcel(Parcel source) {
552 return new Folder(source, null);
556 public Folder createFromParcel(Parcel source, ClassLoader loader) {
557 return new Folder(source, loader);
561 public Folder[] newArray(int size) {
562 return new Folder[size];
568 // Return a sort of version number for this parcelable folder. Starting with zero.
574 if (o == null || !(o instanceof Folder)) {
577 return Objects.equal(folderUri, ((Folder) o).folderUri);
604 public int compareTo(Folder other) {
609 * Returns a boolean indicating whether network activity (sync) is occuring for this folder.
621 public static void setFolderBlockColor(Folder folder, View colorBlock) {
626 !TextUtils.isEmpty(folder.bgColor) && (folder.type & FolderType.INBOX_SECTION) == 0;
627 final int backgroundColor = showBg ? Integer.parseInt(folder.bgColor) : 0;
644 public static void setIcon(Folder folder, ImageView iconView) {
648 int icon = folder.iconResId;
651 if (icon == R.drawable.ic_drawer_folder_24dp && folder.hasChildren) {
659 if (folder.supportsCapability(UIProvider.FolderCapabilities.TINT_ICON)) {
661 defaultIconDrawable.mutate().setColorFilter(folder.getBackgroundColor(0xFFFFFF),
682 LogUtils.e(LogUtils.TAG, "No icon returned for folder %s", folder);
687 * Return if the type of the folder matches a provider defined folder.
704 public static String[] getUriArray(List<Folder> folders) {
710 for (Folder folder : folders) {
711 folderUris[i] = folder.folderUri.toString();
718 * Returns a boolean indicating whether this Folder object has been initialized
740 * Returns {@code true} if this folder is an inbox folder.
747 * Returns {@code true} if this folder is a search folder.
754 * Returns {@code true} if this folder is the spam folder.
761 * Return if this is the trash folder.
768 * Return if this is a draft folder.
775 * Whether this folder supports only showing important messages.
783 * Return if this is the sent folder.
790 * Return if this is the outbox folder
797 * Whether this is the special folder just used to display all mail for an account.
804 * Return true if this folder prefers to display recipients over senders.
811 * Return true if this folder prefers to display recipients over senders.
818 * @return a non-user facing English string describing this folder's type
863 * Returns true if unread count should be suppressed for this folder. This is done for folders
876 * @return Constructed folder object
879 public static Folder fromString(String inString) {
883 final Folder f = new Folder();
889 // If no separator was found, we can't parse this folder and the
900 f.folderUri = new FolderUri(Folder.getValidUri(split[index++]));
924 f.parent = Folder.getValidUri(split[index++]);
937 public static final boolean isRoot(Folder folder) {
938 return (folder == null) || Uri.EMPTY.equals(folder.parent);