Loading app/core/src/main/java/com/fsck/k9/controller/MessagingController.java +3 −3 Original line number Diff line number Diff line Loading @@ -392,7 +392,7 @@ public class MessagingController { public void refreshFolderListSynchronous(Account account) { try { ServerSettings serverSettings = account.getIncomingServerSettings(); if (serverSettings.password == null) { if (serverSettings.isMissingCredentials()) { handleAuthenticationFailure(account, true); return; } Loading Loading @@ -651,7 +651,7 @@ public class MessagingController { private void syncFolder(Account account, long folderId, MessagingListener listener, Backend backend) { ServerSettings serverSettings = account.getIncomingServerSettings(); if (serverSettings.password == null) { if (serverSettings.isMissingCredentials()) { handleAuthenticationFailure(account, true); return; } Loading Loading @@ -1512,7 +1512,7 @@ public class MessagingController { boolean wasPermanentFailure = false; try { ServerSettings serverSettings = account.getOutgoingServerSettings(); if (serverSettings.password == null) { if (serverSettings.isMissingCredentials()) { handleAuthenticationFailure(account, false); return; } Loading app/core/src/main/java/com/fsck/k9/job/MailSyncWorker.kt +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class MailSyncWorker( return Result.success() } if (account.incomingServerSettings.password == null) { if (account.incomingServerSettings.isMissingCredentials) { Timber.d("Password for this account is missing. Skipping mail sync.") return Result.success() } Loading mail/common/src/main/java/com/fsck/k9/mail/ServerSettings.kt +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,11 @@ data class ServerSettings @JvmOverloads constructor( @JvmField val clientCertificateAlias: String?, val extra: Map<String, String?> = emptyMap() ) { val isMissingCredentials: Boolean = when (authenticationType) { AuthType.EXTERNAL -> clientCertificateAlias == null else -> password == null } init { require(type == type.toLowerCase(Locale.ROOT)) { "type must be all lower case" } } Loading Loading
app/core/src/main/java/com/fsck/k9/controller/MessagingController.java +3 −3 Original line number Diff line number Diff line Loading @@ -392,7 +392,7 @@ public class MessagingController { public void refreshFolderListSynchronous(Account account) { try { ServerSettings serverSettings = account.getIncomingServerSettings(); if (serverSettings.password == null) { if (serverSettings.isMissingCredentials()) { handleAuthenticationFailure(account, true); return; } Loading Loading @@ -651,7 +651,7 @@ public class MessagingController { private void syncFolder(Account account, long folderId, MessagingListener listener, Backend backend) { ServerSettings serverSettings = account.getIncomingServerSettings(); if (serverSettings.password == null) { if (serverSettings.isMissingCredentials()) { handleAuthenticationFailure(account, true); return; } Loading Loading @@ -1512,7 +1512,7 @@ public class MessagingController { boolean wasPermanentFailure = false; try { ServerSettings serverSettings = account.getOutgoingServerSettings(); if (serverSettings.password == null) { if (serverSettings.isMissingCredentials()) { handleAuthenticationFailure(account, false); return; } Loading
app/core/src/main/java/com/fsck/k9/job/MailSyncWorker.kt +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class MailSyncWorker( return Result.success() } if (account.incomingServerSettings.password == null) { if (account.incomingServerSettings.isMissingCredentials) { Timber.d("Password for this account is missing. Skipping mail sync.") return Result.success() } Loading
mail/common/src/main/java/com/fsck/k9/mail/ServerSettings.kt +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,11 @@ data class ServerSettings @JvmOverloads constructor( @JvmField val clientCertificateAlias: String?, val extra: Map<String, String?> = emptyMap() ) { val isMissingCredentials: Boolean = when (authenticationType) { AuthType.EXTERNAL -> clientCertificateAlias == null else -> password == null } init { require(type == type.toLowerCase(Locale.ROOT)) { "type must be all lower case" } } Loading