From aaa2934af471b16ba85ca1f32ae789a2e3947bd2 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 14 Jan 2020 16:53:27 +0100 Subject: [PATCH] Check for providers with a proprietary protocol --- .../main/java/eu/faircode/email/EmailProvider.java | 12 ++++++++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 13 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/EmailProvider.java b/app/src/main/java/eu/faircode/email/EmailProvider.java index d6ddf40fe8..331709c799 100644 --- a/app/src/main/java/eu/faircode/email/EmailProvider.java +++ b/app/src/main/java/eu/faircode/email/EmailProvider.java @@ -80,6 +80,15 @@ public class EmailProvider { private static final int SCAN_TIMEOUT = 5 * 1000; // milliseconds private static final int ISPDB_TIMEOUT = 15 * 1000; // milliseconds + private static final List PROPRIETARY = Collections.unmodifiableList(Arrays.asList( + "protonmail.ch", + "protonmail.com", + "tutanota.com", + "tutanota.de", + "tutamail.com", // tutanota + "tuta.io", // tutanota + "keemailme" // tutanota + )); private static final ExecutorService executor = Helper.getBackgroundExecutor(0, "provider"); @@ -194,6 +203,9 @@ public class EmailProvider { if (at < 0) email = "someone@" + domain; + if (PROPRIETARY.contains(domain)) + throw new IllegalArgumentException(context.getString(R.string.title_no_standard)); + List providers = loadProfiles(context); for (EmailProvider provider : providers) if (provider.domain != null) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f3bbeb720b..0937b7cfdb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -513,6 +513,7 @@ Inbox not found No primary account or no drafts folder Sending emails requires at least one identity + This provider uses a proprietary email protocol and therefore it is not possible to use third part email clients This provider does not support push messages. This will delay reception of new messages and increase battery usage. This provider does not support UTF-8 Synchronization errors since %1$s