Lines Matching full:mailbox
21 import com.android.emailcommon.provider.Mailbox;
37 * Some methods probably should belong to {@link Mailbox}, but as this class uses resources,
81 if (mailboxId == Mailbox.QUERY_ALL_INBOXES) {
83 } else if (mailboxId == Mailbox.QUERY_ALL_FAVORITES) {
85 } else if (mailboxId == Mailbox.QUERY_ALL_DRAFTS) {
87 } else if (mailboxId == Mailbox.QUERY_ALL_OUTBOX) {
109 * Return the display name for a mailbox for UI. For normal mailboxes, it just returns
113 * @param mailboxType Such as {@link Mailbox#TYPE_INBOX}
114 * @param mailboxId ID of a mailbox.
115 * @param originalDisplayName Display name of the mailbox stored in the database.
126 * Same as {@link #getDisplayName(int, long, String)}, but gets information form a mailbox
140 public String getDisplayName(Mailbox mailbox) {
141 return getDisplayName(mailbox.mType, mailbox.mId, mailbox.mDisplayName);
145 * Return the message count which should be shown with a mailbox name. Depending on
146 * the mailbox type, we change what to show.
148 * @param mailboxType Such as {@link Mailbox#TYPE_INBOX}
154 case Mailbox.TYPE_DRAFTS:
155 case Mailbox.TYPE_OUTBOX:
157 case Mailbox.TYPE_SENT:
158 case Mailbox.TYPE_TRASH:
165 * Same as {@link #getMessageCount(int, int, int)}, but gets information form a mailbox
187 if ((mailboxId == Mailbox.QUERY_ALL_INBOXES)
188 || (mailboxId == Mailbox.QUERY_ALL_UNREAD)) {
189 return Mailbox.getUnreadCountByMailboxType(context, Mailbox.TYPE_INBOX);
191 } else if (mailboxId == Mailbox.QUERY_ALL_FAVORITES) {
194 } else if (mailboxId == Mailbox.QUERY_ALL_DRAFTS) {
195 return Mailbox.getMessageCountByMailboxType(context, Mailbox.TYPE_DRAFTS);
197 } else if (mailboxId == Mailbox.QUERY_ALL_OUTBOX) {
198 return Mailbox.getMessageCountByMailboxType(context, Mailbox.TYPE_OUTBOX);
200 throw new IllegalStateException("Invalid mailbox ID");
207 if (mailboxId == Mailbox.QUERY_ALL_INBOXES) {
209 } else if (mailboxId == Mailbox.QUERY_ALL_FAVORITES) {
211 } else if (mailboxId == Mailbox.QUERY_ALL_DRAFTS) {
212 return mSpecialMailboxDrawable.getDrawable(Mailbox.TYPE_DRAFTS);
213 } else if (mailboxId == Mailbox.QUERY_ALL_OUTBOX) {
214 return mSpecialMailboxDrawable.getDrawable(Mailbox.TYPE_OUTBOX);