Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +4 −7 Original line number Diff line number Diff line Loading @@ -1644,12 +1644,10 @@ open class MessageList : Log.e("MessageList", "Google account size "+googleAccounts.size) for (googleAccount in googleAccounts) { val emailId: String = accountManager.getUserData(googleAccount, ACCOUNT_EMAIL_ADDRESS_KEY) Log.e("MessageList", "Google emailId "+emailId) var accountIsSignedIn = false for (account in accounts) { Log.e("MessageList", "account.email "+account.email) if (emailId == account.email) { Log.e("MessageList", "account.email true..") if (account.name == null) { // we need to fix an old bug account.name = emailId Preferences.getPreferences(this).saveAccount(account) Loading @@ -1658,15 +1656,14 @@ open class MessageList : break } } Log.e("MessageList", "accountIsSignedIn "+accountIsSignedIn) if (!accountIsSignedIn) { Log.e("MessageList", "accountIsSignedIn "+accountIsSignedIn) //GoogleAccountCreator.createAccount(this, emailId, "asdf*1234@") EeloAccountCreator.createAccount(this, emailId, "") accountWasAdded = true } } accountWasAdded return accountWasAdded } catch (e: SecurityException) { e.printStackTrace() false Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; Loading Loading @@ -69,6 +70,8 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList private static final String EXTRA_CHECK_DIRECTION ="checkDirection"; private String className=this.getClass().getName(); public enum CheckDirection { INCOMING, OUTGOING; Loading Loading @@ -461,6 +464,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList finish(); } catch (OAuth2NeedUserPromptException ignored) { //let the user do oauth2 flow procedure through webview Log.e(className, ignored.getMessage()); } } catch (AuthenticationFailedException afe) { Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/AccountManagerConstants.kt +3 −0 Original line number Diff line number Diff line Loading @@ -5,4 +5,7 @@ object AccountManagerConstants { const val GOOGLE_ACCOUNT_TYPE = "e.foundation.webdav.google" const val ACCOUNT_EMAIL_ADDRESS_KEY = "email_address" const val MAIL_CONTENT_AUTHORITY = "foundation.e.mail.provider.AppContentProvider" const val GMAIL_AUTH_TOKEN_TYPE = "oauth2:https://mail.google.com/" } No newline at end of file Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +4 −7 Original line number Diff line number Diff line Loading @@ -1644,12 +1644,10 @@ open class MessageList : Log.e("MessageList", "Google account size "+googleAccounts.size) for (googleAccount in googleAccounts) { val emailId: String = accountManager.getUserData(googleAccount, ACCOUNT_EMAIL_ADDRESS_KEY) Log.e("MessageList", "Google emailId "+emailId) var accountIsSignedIn = false for (account in accounts) { Log.e("MessageList", "account.email "+account.email) if (emailId == account.email) { Log.e("MessageList", "account.email true..") if (account.name == null) { // we need to fix an old bug account.name = emailId Preferences.getPreferences(this).saveAccount(account) Loading @@ -1658,15 +1656,14 @@ open class MessageList : break } } Log.e("MessageList", "accountIsSignedIn "+accountIsSignedIn) if (!accountIsSignedIn) { Log.e("MessageList", "accountIsSignedIn "+accountIsSignedIn) //GoogleAccountCreator.createAccount(this, emailId, "asdf*1234@") EeloAccountCreator.createAccount(this, emailId, "") accountWasAdded = true } } accountWasAdded return accountWasAdded } catch (e: SecurityException) { e.printStackTrace() false Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupCheckSettings.java +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; Loading Loading @@ -69,6 +70,8 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList private static final String EXTRA_CHECK_DIRECTION ="checkDirection"; private String className=this.getClass().getName(); public enum CheckDirection { INCOMING, OUTGOING; Loading Loading @@ -461,6 +464,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList finish(); } catch (OAuth2NeedUserPromptException ignored) { //let the user do oauth2 flow procedure through webview Log.e(className, ignored.getMessage()); } } catch (AuthenticationFailedException afe) { Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/AccountManagerConstants.kt +3 −0 Original line number Diff line number Diff line Loading @@ -5,4 +5,7 @@ object AccountManagerConstants { const val GOOGLE_ACCOUNT_TYPE = "e.foundation.webdav.google" const val ACCOUNT_EMAIL_ADDRESS_KEY = "email_address" const val MAIL_CONTENT_AUTHORITY = "foundation.e.mail.provider.AppContentProvider" const val GMAIL_AUTH_TOKEN_TYPE = "oauth2:https://mail.google.com/" } No newline at end of file