From 8419e1f35d3f51a83b86ba348888915a4051928b Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Thu, 7 Jun 2018 12:42:25 +0200 Subject: [PATCH] Correctly enable/disable the fingerprint option in the intro --- .../impy/aegis/ui/slides/CustomAuthenticationSlide.java | 9 +++------ .../main/res/layout/fragment_authentication_slide.xml | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/me/impy/aegis/ui/slides/CustomAuthenticationSlide.java b/app/src/main/java/me/impy/aegis/ui/slides/CustomAuthenticationSlide.java index b46f7421..ef5ea468 100644 --- a/app/src/main/java/me/impy/aegis/ui/slides/CustomAuthenticationSlide.java +++ b/app/src/main/java/me/impy/aegis/ui/slides/CustomAuthenticationSlide.java @@ -8,10 +8,8 @@ import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.ArrayAdapter; import android.widget.RadioButton; import android.widget.RadioGroup; -import android.widget.Spinner; import android.widget.TextView; import com.github.paolorotolo.appintro.ISlidePolicy; @@ -25,7 +23,6 @@ public class CustomAuthenticationSlide extends Fragment implements ISlidePolicy, public static final int CRYPT_TYPE_PASS = 2; public static final int CRYPT_TYPE_FINGER = 3; - private Spinner _authenticationSpinner; private RadioGroup _buttonGroup; private int _bgColor; @@ -36,13 +33,13 @@ public class CustomAuthenticationSlide extends Fragment implements ISlidePolicy, _buttonGroup.setOnCheckedChangeListener(this); onCheckedChanged(_buttonGroup, _buttonGroup.getCheckedRadioButtonId()); - // only show the fingerprint option if the api version is new enough, permission is granted and a scanner is found + // only enable the fingerprint option if the api version is new enough, permission is granted and a scanner is found FingerprintManager manager = FingerprintHelper.getManager(getContext()); if (manager != null) { RadioButton button = view.findViewById(R.id.rb_fingerprint); TextView text = view.findViewById(R.id.text_rb_fingerprint); - button.setEnabled(false); - text.setEnabled(false); + button.setEnabled(true); + text.setEnabled(true); } view.findViewById(R.id.main).setBackgroundColor(_bgColor); diff --git a/app/src/main/res/layout/fragment_authentication_slide.xml b/app/src/main/res/layout/fragment_authentication_slide.xml index 030c0f2e..c480af0a 100644 --- a/app/src/main/res/layout/fragment_authentication_slide.xml +++ b/app/src/main/res/layout/fragment_authentication_slide.xml @@ -72,6 +72,7 @@