Debug info: auth type

pull/212/head
M66B 2 years ago
parent e257c1a6ef
commit 16c3a985bf

@ -2427,8 +2427,9 @@ public class Log {
}
size += write(os, account.name + (account.primary ? "*" : "") +
" " + (account.protocol == EntityAccount.TYPE_IMAP ? "IMAP" : "POP") + "/" + account.auth_type +
(account.provider == null ? "" : " [" + account.provider + "]") +
" " + (account.protocol == EntityAccount.TYPE_IMAP ? "IMAP" : "POP") +
" [" + (account.provider == null ? "" : account.provider) +
":" + ServiceAuthenticator.getAuthTypeName(account.auth_type) + "]" +
" " + account.host + ":" + account.port + "/" + account.encryption +
" sync=" + account.synchronize +
" exempted=" + account.poll_exempted +
@ -2487,7 +2488,8 @@ public class Log {
size += write(os, account.name + "/" + identity.name + (identity.primary ? "*" : "") + " " +
identity.display + " " + identity.email +
(identity.self ? "" : " !self") +
(identity.provider == null ? "" : " [" + identity.provider + "]") +
" [" + (identity.provider == null ? "" : identity.provider) +
":" + ServiceAuthenticator.getAuthTypeName(identity.auth_type) + "]" +
(TextUtils.isEmpty(identity.sender_extra_regex) ? "" : " regex=" + identity.sender_extra_regex) +
(!identity.sender_extra ? "" : " edit" +
(identity.sender_extra_name ? "+name" : "-name") +

@ -232,6 +232,19 @@ public class ServiceAuthenticator extends Authenticator {
}
}
static String getAuthTypeName(int auth_type) {
if (auth_type == AUTH_TYPE_PASSWORD)
return "password";
else if (auth_type == AUTH_TYPE_GMAIL)
return "gmail";
else if (auth_type == AUTH_TYPE_OAUTH)
return "oauth";
else if (auth_type == AUTH_TYPE_GRAPH)
return "graph";
else
return "?" + auth_type;
}
static String getAuthTokenType(String type) {
// https://developers.google.com/gmail/imap/xoauth2-protocol
if (TYPE_GOOGLE.equals(type))

Loading…
Cancel
Save