Merge branch 'readonly-p4-donut' into donut

This commit is contained in:
Andy Stadler 2009-04-22 18:46:52 -07:00 committed by The Android Open Source Project
commit 28874ce460
2 changed files with 17 additions and 0 deletions

View File

@ -246,6 +246,9 @@ public class MessagingController implements Runnable {
}
localFolders = localStore.getPersonalNamespaces();
// Signal the remote store that it can now use folder-based callbacks
store.localFolderSetupComplete();
for (MessagingListener l : mListeners) {
l.listFolders(account, localFolders);

View File

@ -192,6 +192,20 @@ public abstract class Store {
public abstract Folder getFolder(String name) throws MessagingException;
public abstract Folder[] getPersonalNamespaces() throws MessagingException;
/**
* This function will be called after the messaging controller has called
* getPersonalNamespaces() and has created a matching set of LocalFolder objects. This can
* be used as a trigger for the store to write back any folder-specific persistent data using
* callbacks.
*
* This is not abstract because most stores do not require this functionality and do not
* need to implement it.
*/
@SuppressWarnings("unused")
public void localFolderSetupComplete() throws MessagingException {
// Do nothing - return immediately
}
public abstract void checkSettings() throws MessagingException;