Prevent blocking common domain names

This commit is contained in:
M66B
2020-04-19 16:57:40 +02:00
parent 6110ff0aa6
commit 242e0a0fd0
4 changed files with 32 additions and 5 deletions

View File

@@ -99,6 +99,22 @@ public class EmailProvider {
throw new UnknownHostException(this.name + " invalid");
}
static List<String> getDomainNames(Context context) {
List<String> result = new ArrayList<>();
for (String domain : PROPRIETARY)
result.add(domain.replace(".", "\\."));
List<EmailProvider> providers = loadProfiles(context);
for (EmailProvider provider : providers)
if (provider.domain != null)
for (String domain : provider.domain)
if (!result.contains(domain))
result.add(domain);
return result;
}
static List<EmailProvider> loadProfiles(Context context) {
List<EmailProvider> result = null;
try {