AI 147423: Provide a hook to notify remote stores that local stores are set up.
BUG=1807499 Automated import of CL 147423
This commit is contained in:
parent
29bbfd0b97
commit
912dc3b194
@ -246,6 +246,9 @@ public class MessagingController implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
localFolders = localStore.getPersonalNamespaces();
|
localFolders = localStore.getPersonalNamespaces();
|
||||||
|
|
||||||
|
// Signal the remote store that it can now use folder-based callbacks
|
||||||
|
store.localFolderSetupComplete();
|
||||||
|
|
||||||
for (MessagingListener l : mListeners) {
|
for (MessagingListener l : mListeners) {
|
||||||
l.listFolders(account, localFolders);
|
l.listFolders(account, localFolders);
|
||||||
|
@ -192,6 +192,20 @@ public abstract class Store {
|
|||||||
public abstract Folder getFolder(String name) throws MessagingException;
|
public abstract Folder getFolder(String name) throws MessagingException;
|
||||||
|
|
||||||
public abstract Folder[] getPersonalNamespaces() 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;
|
public abstract void checkSettings() throws MessagingException;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user