From 36ad6dee4fbe5676c4226c3b57a418869fe40800 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 13 Mar 2021 10:44:12 +0100 Subject: [PATCH] How are passwords stored? --- .../eu/faircode/email/FragmentAccount.java | 11 ++++++++ .../eu/faircode/email/FragmentIdentity.java | 11 ++++++++ .../java/eu/faircode/email/FragmentPop.java | 11 ++++++++ app/src/main/res/layout/fragment_account.xml | 20 ++++++++++++-- app/src/main/res/layout/fragment_identity.xml | 19 +++++++++++-- app/src/main/res/layout/fragment_pop.xml | 27 ++++++++++++++++++- app/src/main/res/values/strings.xml | 1 + 7 files changed, 95 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 2a27463968..99c9910662 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -23,6 +23,7 @@ import android.app.NotificationManager; import android.content.Context; import android.content.Intent; import android.graphics.Color; +import android.graphics.Paint; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -91,6 +92,7 @@ public class FragmentAccount extends FragmentBase { private EditText etUser; private TextInputLayout tilPassword; private TextView tvCharacters; + private TextView tvPasswordStorage; private Button btnCertificate; private TextView tvCertificate; private EditText etRealm; @@ -195,6 +197,7 @@ public class FragmentAccount extends FragmentBase { etUser = view.findViewById(R.id.etUser); tilPassword = view.findViewById(R.id.tilPassword); tvCharacters = view.findViewById(R.id.tvCharacters); + tvPasswordStorage = view.findViewById(R.id.tvPasswordStorage); btnCertificate = view.findViewById(R.id.btnCertificate); tvCertificate = view.findViewById(R.id.tvCertificate); etRealm = view.findViewById(R.id.etRealm); @@ -338,6 +341,14 @@ public class FragmentAccount extends FragmentBase { } }); + tvPasswordStorage.setPaintFlags(tvPasswordStorage.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPasswordStorage.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 37); + } + }); + btnCertificate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index 40634e99eb..7336524efb 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; +import android.graphics.Paint; import android.net.Uri; import android.os.Bundle; import android.text.Editable; @@ -97,6 +98,7 @@ public class FragmentIdentity extends FragmentBase { private EditText etUser; private TextInputLayout tilPassword; private TextView tvCharacters; + private TextView tvPasswordStorage; private Button btnCertificate; private TextView tvCertificate; private EditText etRealm; @@ -192,6 +194,7 @@ public class FragmentIdentity extends FragmentBase { etUser = view.findViewById(R.id.etUser); tilPassword = view.findViewById(R.id.tilPassword); tvCharacters = view.findViewById(R.id.tvCharacters); + tvPasswordStorage = view.findViewById(R.id.tvPasswordStorage); btnCertificate = view.findViewById(R.id.btnCertificate); tvCertificate = view.findViewById(R.id.tvCertificate); etRealm = view.findViewById(R.id.etRealm); @@ -313,6 +316,14 @@ public class FragmentIdentity extends FragmentBase { } }); + tvPasswordStorage.setPaintFlags(tvPasswordStorage.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPasswordStorage.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 37); + } + }); + btnColor.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/java/eu/faircode/email/FragmentPop.java b/app/src/main/java/eu/faircode/email/FragmentPop.java index 0e02f95b70..9bae082d13 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPop.java +++ b/app/src/main/java/eu/faircode/email/FragmentPop.java @@ -23,6 +23,7 @@ import android.app.NotificationManager; import android.content.Context; import android.content.Intent; import android.graphics.Color; +import android.graphics.Paint; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -76,6 +77,7 @@ public class FragmentPop extends FragmentBase { private EditText etUser; private TextInputLayout tilPassword; private TextView tvCharacters; + private TextView tvPasswordStorage; private EditText etName; private ViewButtonColor btnColor; @@ -138,6 +140,7 @@ public class FragmentPop extends FragmentBase { etUser = view.findViewById(R.id.etUser); tilPassword = view.findViewById(R.id.tilPassword); tvCharacters = view.findViewById(R.id.tvCharacters); + tvPasswordStorage = view.findViewById(R.id.tvPasswordStorage); etName = view.findViewById(R.id.etName); btnColor = view.findViewById(R.id.btnColor); @@ -197,6 +200,14 @@ public class FragmentPop extends FragmentBase { } }); + tvPasswordStorage.setPaintFlags(tvPasswordStorage.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPasswordStorage.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 37); + } + }); + btnColor.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout/fragment_account.xml b/app/src/main/res/layout/fragment_account.xml index 5f8cb84eaa..3876d454de 100644 --- a/app/src/main/res/layout/fragment_account.xml +++ b/app/src/main/res/layout/fragment_account.xml @@ -293,6 +293,20 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvCharacters" /> + +