Minor changes to front-end and interface to handle no implementation
This commit is contained in:
parent
7774ebc788
commit
25cba114a6
5 changed files with 6 additions and 5 deletions
|
@ -330,7 +330,8 @@ class ImapConnection {
|
|||
private void authenticate() throws MessagingException, IOException {
|
||||
switch (settings.getAuthType()) {
|
||||
case XOAUTH2:
|
||||
if (hasCapability(Capabilities.AUTH_XOAUTH2) && hasCapability(Capabilities.SASL_IR)) {
|
||||
if (hasCapability(Capabilities.AUTH_XOAUTH2) && hasCapability(Capabilities.SASL_IR)
|
||||
&& oauthTokenProvider != null) {
|
||||
authXoauth2withSASLIR();
|
||||
} else {
|
||||
throw new MessagingException("Server doesn't support SASL XOAUTH2.");
|
||||
|
|
|
@ -354,7 +354,7 @@ public class SmtpTransport extends Transport {
|
|||
}
|
||||
break;
|
||||
case XOAUTH2:
|
||||
if (authXoauth2Supported) {
|
||||
if (authXoauth2Supported && oauthTokenProvider != null) {
|
||||
saslXoauth2(mUsername);
|
||||
} else {
|
||||
throw new MessagingException("Authentication method XOAUTH2 is unavailable.");
|
||||
|
|
|
@ -1287,7 +1287,7 @@ public class Account implements BaseAccount, StoreConfig {
|
|||
}
|
||||
|
||||
public Store getRemoteStore() throws MessagingException {
|
||||
return RemoteStore.getInstance(K9.app, this);
|
||||
return RemoteStore.getInstance(K9.app, this, null);
|
||||
}
|
||||
|
||||
// It'd be great if this actually went into the store implementation
|
||||
|
|
|
@ -475,7 +475,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList
|
|||
if (!(account.getRemoteStore() instanceof WebDavStore)) {
|
||||
publishProgress(R.string.account_setup_check_settings_check_outgoing_msg);
|
||||
}
|
||||
Transport transport = Transport.getInstance(K9.app, account);
|
||||
Transport transport = Transport.getInstance(K9.app, account, null);
|
||||
transport.close();
|
||||
try {
|
||||
transport.open();
|
||||
|
|
|
@ -2973,7 +2973,7 @@ public class MessagingController {
|
|||
if (K9.DEBUG)
|
||||
Log.i(K9.LOG_TAG, "Scanning folder '" + account.getOutboxFolderName() + "' (" + localFolder.getId() + ") for messages to send");
|
||||
|
||||
Transport transport = Transport.getInstance(K9.app, account);
|
||||
Transport transport = Transport.getInstance(K9.app, account, null);
|
||||
for (LocalMessage message : localMessages) {
|
||||
if (message.isSet(Flag.DELETED)) {
|
||||
message.destroy();
|
||||
|
|
Loading…
Reference in a new issue