From aff86deb875e034d9fad81d3dc96e1da58adf1a1 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 17 Apr 2022 11:45:54 +0200 Subject: [PATCH] Cleanup --- .../java/eu/faircode/email/FragmentOAuth.java | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java index 5c399f8f44..042d73db98 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java +++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java @@ -548,52 +548,6 @@ public class FragmentOAuth extends FragmentBase { String iprotocol = (provider.smtp.starttls ? "smtp" : "smtps"); int iencryption = (provider.smtp.starttls ? EmailService.ENCRYPTION_STARTTLS : EmailService.ENCRYPTION_SSL); - if ("outlook".equals(id) && BuildConfig.DEBUG) { - DB db = DB.getInstance(context); - - // Create account - EntityAccount account = new EntityAccount(); - - account.host = provider.imap.host; - account.encryption = aencryption; - account.port = provider.imap.port; - account.auth_type = AUTH_TYPE_OAUTH; - account.provider = provider.id; - account.user = address; - account.password = state; - - int at = account.user.indexOf('@'); - String user = account.user.substring(0, at); - - account.name = provider.name + "/" + user; - - account.synchronize = true; - account.primary = false; - - if (provider.keepalive > 0) - account.poll_interval = provider.keepalive; - - account.partial_fetch = provider.partial; - - account.created = new Date().getTime(); - account.last_connected = account.created; - - account.id = db.account().insertAccount(account); - args.putLong("account", account.id); - EntityLog.log(context, "OAuth account=" + account.name); - - EntityFolder folder = new EntityFolder("INBOX", EntityFolder.INBOX); - folder.account = account.id; - folder.setProperties(); - folder.setSpecials(account); - folder.id = db.folder().insertFolder(folder); - EntityLog.log(context, "OAuth folder=" + folder.name + " type=" + folder.type); - if (folder.synchronize) - EntityOperation.sync(context, folder.id, true); - - return null; - } - /* * Outlook shared mailbox * Authenticate: main/shared account