Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java +5 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import com.fsck.k9.autodiscovery.api.DiscoveryResults; import com.fsck.k9.autodiscovery.api.DiscoveryTarget; import com.fsck.k9.autodiscovery.providersxml.ProvidersXmlDiscovery; import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mailstore.SpecialLocalFoldersCreator; import com.fsck.k9.ui.ConnectionSettings; import timber.log.Timber; Loading @@ -21,11 +22,13 @@ import timber.log.Timber; public class EeloAccountCreator { private static final ProvidersXmlDiscovery providersXmlDiscovery = DI.get(ProvidersXmlDiscovery.class); private static final AccountCreator accountCreator = DI.get(AccountCreator.class); private static final SpecialLocalFoldersCreator localFoldersCreator = DI.get(SpecialLocalFoldersCreator.class); public static void createAccount(Context context, String emailId, String password) { Preferences preferences = Preferences.getPreferences(context); Account account = preferences.newAccount(); account.setChipColor(accountCreator.pickColor()); account.setEmail(emailId); account.setDescription(emailId); Loading @@ -44,6 +47,8 @@ public class EeloAccountCreator { DeletePolicy deletePolicy = accountCreator.getDefaultDeletePolicy(incomingSettings.type); account.setDeletePolicy(deletePolicy); localFoldersCreator.createSpecialLocalFolders(account); preferences.saveAccount(account); Core.setServicesEnabled(context); } Loading Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java +5 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import com.fsck.k9.autodiscovery.api.DiscoveryResults; import com.fsck.k9.autodiscovery.api.DiscoveryTarget; import com.fsck.k9.autodiscovery.providersxml.ProvidersXmlDiscovery; import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mailstore.SpecialLocalFoldersCreator; import com.fsck.k9.ui.ConnectionSettings; import timber.log.Timber; Loading @@ -21,11 +22,13 @@ import timber.log.Timber; public class EeloAccountCreator { private static final ProvidersXmlDiscovery providersXmlDiscovery = DI.get(ProvidersXmlDiscovery.class); private static final AccountCreator accountCreator = DI.get(AccountCreator.class); private static final SpecialLocalFoldersCreator localFoldersCreator = DI.get(SpecialLocalFoldersCreator.class); public static void createAccount(Context context, String emailId, String password) { Preferences preferences = Preferences.getPreferences(context); Account account = preferences.newAccount(); account.setChipColor(accountCreator.pickColor()); account.setEmail(emailId); account.setDescription(emailId); Loading @@ -44,6 +47,8 @@ public class EeloAccountCreator { DeletePolicy deletePolicy = accountCreator.getDefaultDeletePolicy(incomingSettings.type); account.setDeletePolicy(deletePolicy); localFoldersCreator.createSpecialLocalFolders(account); preferences.saveAccount(account); Core.setServicesEnabled(context); } Loading