Lines Matching refs:folder
28 import com.android.mail.providers.Folder;
44 * A self-updating list of folder canonical names for the N most recently touched folders, ordered
59 /** The actual cache: map of folder URIs to folder objects. */
66 * We exclude the default inbox for the account and the current folder; these might be the
79 * Compare based on alphanumeric name of the folder, ignoring case.
81 private static final Comparator<Folder> ALPHABET_IGNORECASE = new Comparator<Folder>() {
83 public int compare(Folder lhs, Folder rhs) {
88 * Class to store the recent folder list asynchronously.
97 private final Folder mFolder;
100 * Create a new asynchronous task to store the recent folder list. Both the account
101 * and the folder should be non-null.
102 * @param account the current account for this folder.
103 * @param folder the folder which is to be stored.
105 public StoreRecent(Account account, Folder folder) {
106 assert (account != null && folder != null);
108 mFolder = folder;
116 // Only the folder URIs are provided. Providers are free to update their specific
127 * Create a Recent Folder List from the given account. This will query the UIProvider to
165 public void loadFromUiProvider(ObjectCursor<Folder> c) {
180 final Folder folder = c.getModel();
181 final RecentFolderListEntry entry = new RecentFolderListEntry(folder);
182 mFolderCache.putElement(folder.folderUri.fullUri.toString(), entry);
183 LogUtils.v(TAG, "Account %s, Recent: %s", mAccount.getEmailAddress(), folder.name);
188 * Marks the given folder as 'accessed' by the user interface, its entry is updated in the
189 * recent folder list, and the current time is written to the provider. This should never
190 * be called with a null folder.
191 * @param folder the folder we touched
193 public void touchFolder(@NonNull Folder folder, Account account) {
204 if (folder.isProviderFolder() || folder.isType(FolderType.SEARCH)) {
205 LogUtils.d(TAG, "Not touching recent folder because it's provider or search folder");
209 final RecentFolderListEntry entry = new RecentFolderListEntry(folder);
210 mFolderCache.putElement(folder.folderUri.fullUri.toString(), entry);
211 new StoreRecent(mAccount, folder).execute();
215 * Generate a sorted list of recent folders, excluding the passed in folder (if any) and
219 * @param excludedFolderUri the uri of folder to be excluded (typically the current folder)
221 public ArrayList<Folder> getRecentFolderList(final FolderUri excludedFolderUri) {
236 final ArrayList<Folder> recentFolders = Lists.newArrayList();
262 private final Folder mFolder;
265 RecentFolderListEntry(Folder folder) {
266 mFolder = folder;