From 3b129ff6967713fae2d74f1fb5983a7167188d14 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 2 Feb 2023 13:08:38 +0100 Subject: [PATCH] Instructions for 535 5.7.3 Authentication unsuccessful --- app/src/main/java/eu/faircode/email/FragmentOAuth.java | 8 +++++++- app/src/main/res/layout/fragment_oauth.xml | 4 ++-- app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/providers.xml | 6 ++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java index 4ef530c747..e56d189c46 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java +++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java @@ -1023,8 +1023,14 @@ public class FragmentOAuth extends FragmentBase { grpError.setVisibility(View.VISIBLE); if (EntityAccount.isOutlook(id)) { - if (ex instanceof AuthenticationFailedException) + if (ex instanceof AuthenticationFailedException) { + if (ex.getMessage() != null && + ex.getMessage().contains("535 5.7.3 Authentication unsuccessful")) + tvOfficeAuthHint.setText(R.string.title_setup_office_auth_5_7_3); + else + tvOfficeAuthHint.setText(R.string.title_setup_office_auth); tvOfficeAuthHint.setVisibility(View.VISIBLE); + } } EmailProvider provider; diff --git a/app/src/main/res/layout/fragment_oauth.xml b/app/src/main/res/layout/fragment_oauth.xml index 35bf77cde8..40ed32f2be 100644 --- a/app/src/main/res/layout/fragment_oauth.xml +++ b/app/src/main/res/layout/fragment_oauth.xml @@ -225,8 +225,8 @@ android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="@string/title_setup_office_auth" - android:textAppearance="@style/TextAppearance.AppCompat.Small" - android:textStyle="italic" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="?android:attr/textColorPrimary" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvError" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 958a7fc1f9..4b13895d48 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -229,6 +229,7 @@ Why do I need to select an on-device account? I want to authorize an account with a password instead of an on-device account The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled by the system administrator + Please try the quick setup wizard for "Other provider". Authorize access to your %1$s account Authorize an existing account again (otherwise create a new account) Account authorization was updated diff --git a/app/src/main/res/xml/providers.xml b/app/src/main/res/xml/providers.xml index 47ad162592..8a69f6ecaa 100644 --- a/app/src/main/res/xml/providers.xml +++ b/app/src/main/res/xml/providers.xml @@ -42,6 +42,7 @@