mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-21 23:32:51 +00:00
Log IMAP capabilities
This commit is contained in:
parent
bc37955153
commit
ab0144bd42
3 changed files with 46 additions and 1 deletions
|
@ -1571,6 +1571,19 @@ public class IMAPStore extends Store
|
|||
}
|
||||
}
|
||||
|
||||
public synchronized Map<String, String> getCapabilities()
|
||||
throws MessagingException {
|
||||
IMAPProtocol p = null;
|
||||
try {
|
||||
p = getStoreProtocol();
|
||||
return p.getCapabilities();
|
||||
} catch (ProtocolException pex) {
|
||||
throw new MessagingException(pex.getMessage(), pex);
|
||||
} finally {
|
||||
releaseStoreProtocol(p);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the user name to be used with the PROXYAUTH command.
|
||||
* The PROXYAUTH user name can also be set using the
|
||||
|
|
|
@ -77,6 +77,7 @@ import javax.mail.MessagingException;
|
|||
import javax.mail.NoSuchProviderException;
|
||||
import javax.mail.Quota;
|
||||
import javax.mail.ReadOnlyFolderException;
|
||||
import javax.mail.Store;
|
||||
import javax.mail.StoreClosedException;
|
||||
import javax.mail.event.FolderAdapter;
|
||||
import javax.mail.event.FolderEvent;
|
||||
|
@ -1037,7 +1038,14 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
db.account().setAccountState(account.id, "connected");
|
||||
db.account().setAccountError(account.id, null);
|
||||
db.account().setAccountWarning(account.id, null);
|
||||
EntityLog.log(this, account.name + " connected");
|
||||
|
||||
Store istore = iservice.getStore();
|
||||
if (istore instanceof IMAPStore) {
|
||||
Map<String, String> caps = ((IMAPStore) istore).getCapabilities();
|
||||
EntityLog.log(this, account.name + " connected" +
|
||||
" caps=" + (caps == null ? null : TextUtils.join(" ", caps.keySet())));
|
||||
} else
|
||||
EntityLog.log(this, account.name + " connected");
|
||||
|
||||
db.account().setAccountMaxSize(account.id, iservice.getMaxSize());
|
||||
|
||||
|
|
|
@ -379,3 +379,27 @@ diff -rupN /home/marcel/JavaMail/mail/src/main/java/com/sun/mail/imap/protocol/I
|
|||
}
|
||||
}
|
||||
}
|
||||
diff --git a/app/src/main/java/com/sun/mail/imap/IMAPStore.java b/app/src/main/java/com/sun/mail/imap/IMAPStore.java
|
||||
index 087e5a6f5..5fa720f3d 100644
|
||||
--- a/app/src/main/java/com/sun/mail/imap/IMAPStore.java
|
||||
+++ b/app/src/main/java/com/sun/mail/imap/IMAPStore.java
|
||||
@@ -1571,6 +1571,19 @@ public class IMAPStore extends Store
|
||||
}
|
||||
}
|
||||
|
||||
+ public synchronized Map<String, String> getCapabilities()
|
||||
+ throws MessagingException {
|
||||
+ IMAPProtocol p = null;
|
||||
+ try {
|
||||
+ p = getStoreProtocol();
|
||||
+ return p.getCapabilities();
|
||||
+ } catch (ProtocolException pex) {
|
||||
+ throw new MessagingException(pex.getMessage(), pex);
|
||||
+ } finally {
|
||||
+ releaseStoreProtocol(p);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Set the user name to be used with the PROXYAUTH command.
|
||||
* The PROXYAUTH user name can also be set using the
|
||||
|
|
Loading…
Reference in a new issue