From 1c97002cdc8e5815b4e352e2aa38c449fc62337f Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 15 Nov 2019 10:51:59 +0100 Subject: [PATCH] Always allow showing account/identity passwords Concerned people can use biometric authentication or a PIN --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 3 --- app/src/main/java/eu/faircode/email/FragmentIdentity.java | 4 ---- app/src/main/java/eu/faircode/email/FragmentPop.java | 4 ---- 3 files changed, 11 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index a6d923a2e7..d12bf540e2 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -68,8 +68,6 @@ import java.util.Objects; import javax.mail.Folder; import static android.app.Activity.RESULT_OK; -import static com.google.android.material.textfield.TextInputLayout.END_ICON_NONE; -import static com.google.android.material.textfield.TextInputLayout.END_ICON_PASSWORD_TOGGLE; public class FragmentAccount extends FragmentBase { private ViewGroup view; @@ -423,7 +421,6 @@ public class FragmentAccount extends FragmentBase { rgEncryption.setVisibility(View.GONE); cbInsecure.setVisibility(View.GONE); - tilPassword.setEndIconMode(id < 0 ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE); btnAdvanced.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index c137ae6b95..9d5406e5fd 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -69,8 +69,6 @@ import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import static android.app.Activity.RESULT_OK; -import static com.google.android.material.textfield.TextInputLayout.END_ICON_NONE; -import static com.google.android.material.textfield.TextInputLayout.END_ICON_PASSWORD_TOGGLE; public class FragmentIdentity extends FragmentBase { private ViewGroup view; @@ -217,7 +215,6 @@ public class FragmentIdentity extends FragmentBase { tvInstructions.setVisibility(View.GONE); grpAdvanced.setVisibility(View.GONE); } - tilPassword.setEndIconMode(position == 0 ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE); Integer tag = (Integer) adapterView.getTag(); if (Objects.equals(tag, position)) @@ -424,7 +421,6 @@ public class FragmentIdentity extends FragmentBase { btnAutoConfig.setEnabled(false); pbAutoConfig.setVisibility(View.GONE); cbInsecure.setVisibility(View.GONE); - tilPassword.setEndIconMode(id < 0 ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE); btnAdvanced.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentPop.java b/app/src/main/java/eu/faircode/email/FragmentPop.java index a9dd9abdfb..4d6e4b82f7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPop.java +++ b/app/src/main/java/eu/faircode/email/FragmentPop.java @@ -52,8 +52,6 @@ import com.google.android.material.textfield.TextInputLayout; import java.util.Date; import static android.app.Activity.RESULT_OK; -import static com.google.android.material.textfield.TextInputLayout.END_ICON_NONE; -import static com.google.android.material.textfield.TextInputLayout.END_ICON_PASSWORD_TOGGLE; public class FragmentPop extends FragmentBase { private ViewGroup view; @@ -165,8 +163,6 @@ public class FragmentPop extends FragmentBase { // Initialize Helper.setViewsEnabled(view, false); - tilPassword.setEndIconMode(id < 0 ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE); - pbSave.setVisibility(View.GONE); grpError.setVisibility(View.GONE);