diff --git a/src/org/thoughtcrime/securesms/RegistrationActivity.java b/src/org/thoughtcrime/securesms/RegistrationActivity.java index 96bca61ae..c0cdd48b7 100644 --- a/src/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/org/thoughtcrime/securesms/RegistrationActivity.java @@ -259,6 +259,9 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve } else if (isGmail(email)) { showGmailNoOauth2Hint(); oauth2started.set(false); + } else if (isOutlook(email)) { + showOutlookHint(); + oauth2started.set(false); } else { oauth2started.set(false); @@ -311,6 +314,30 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve } } + private boolean isOutlook(String email) { + return email != null + && (email.toLowerCase().contains("@outlook.") || email.toLowerCase().contains("@hotmail.")); + } + + private boolean outlookDialogShown; + private void showOutlookHint() + { + if(!outlookDialogShown) { + outlookDialogShown = true; + new AlertDialog.Builder(this) + .setMessage( + "Outlook- and Hotmail-e-mail-addresses " + + "may currently not work as expected " + + "as these servers may remove some important transport information." + + "\n\n" + + "Hopefully sooner or later there will be a fix; " + + "for now, we suggest to use another e-mail-address " + + "or try Delta Chat again when the issue is fixed.") + .setPositiveButton(R.string.ok, null) + .show(); + } + } + private void verifyEmail(TextInputEditText view) { String error = getString(R.string.login_error_mail); String email = view.getText().toString();