|
|
|
@ -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);
|
|
|
|
|