From cb168a613357226913a9760c0973fbbdbb9dbd25 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 13 Mar 2022 14:39:19 +0100 Subject: [PATCH] Added auth check info button --- .../faircode/email/FragmentOptionsSynchronize.java | 10 ++++++++++ app/src/main/java/eu/faircode/email/Helper.java | 1 + .../main/res/layout/fragment_options_synchronize.xml | 12 +++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java b/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java index a62fcb6086..7db5fec1c6 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsSynchronize.java @@ -23,6 +23,7 @@ import android.app.Dialog; import android.app.TimePickerDialog; import android.content.Context; import android.content.SharedPreferences; +import android.net.Uri; import android.os.Bundle; import android.text.format.DateFormat; import android.view.LayoutInflater; @@ -91,6 +92,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr private SwitchCompat swTuneKeepAlive; private SwitchCompat swCheckAuthentication; + private ImageButton ibCheckAuthenticationInfo; private SwitchCompat swCheckTls; private ImageButton ibCheckTlsInfo; private SwitchCompat swCheckReply; @@ -164,6 +166,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr swTuneKeepAlive = view.findViewById(R.id.swTuneKeepAlive); swCheckAuthentication = view.findViewById(R.id.swCheckAuthentication); + ibCheckAuthenticationInfo = view.findViewById(R.id.ibCheckAuthenticationInfo); swCheckTls = view.findViewById(R.id.swCheckTls); ibCheckTlsInfo = view.findViewById(R.id.ibCheckTlsInfo); swCheckReply = view.findViewById(R.id.swCheckReply); @@ -399,6 +402,13 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr } }); + ibCheckAuthenticationInfo.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.view(v.getContext(), Uri.parse(Helper.AUTH_RESULTS_URI), true); + } + }); + swCheckTls.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean checked) { diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 6f03981a58..59bf7625cc 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -179,6 +179,7 @@ public class Helper { static final String TEST_URI = "https://play.google.com/apps/testing/" + BuildConfig.APPLICATION_ID; static final String BIMI_PRIVACY_URI = "https://datatracker.ietf.org/doc/html/draft-brotman-ietf-bimi-guidance-03#section-7.4"; static final String ID_COMMAND_URI = "https://datatracker.ietf.org/doc/html/rfc2971#section-3.1"; + static final String AUTH_RESULTS_URI = "https://datatracker.ietf.org/doc/html/rfc7601"; static final String FAVICON_PRIVACY_URI = "https://en.wikipedia.org/wiki/Favicon"; static final String GRAVATAR_PRIVACY_URI = "https://en.wikipedia.org/wiki/Gravatar"; static final String LICENSE_URI = "https://www.gnu.org/licenses/gpl-3.0.html"; diff --git a/app/src/main/res/layout/fragment_options_synchronize.xml b/app/src/main/res/layout/fragment_options_synchronize.xml index 3552bbf2ba..c9eec23775 100644 --- a/app/src/main/res/layout/fragment_options_synchronize.xml +++ b/app/src/main/res/layout/fragment_options_synchronize.xml @@ -769,6 +769,16 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swCheckAuthentication" /> + +