Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9cb83e4 authored by joshmccloskey's avatar joshmccloskey
Browse files

Corrected flow for accessibility.

Fixes: 132635400
Test: Manual.
Change-Id: Ied01b76d273b35e01f83a0a744ca2768d02380c5
parent 6a3eb317
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
import android.widget.Button;
import android.widget.CompoundButton;

@@ -107,6 +108,16 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
                        .build()
        );

        boolean accessibilityEnabled = false;
        final AccessibilityManager accessibilityManager = getApplicationContext().getSystemService(
                AccessibilityManager.class);
        if (accessibilityManager != null) {
            accessibilityEnabled = accessibilityManager.isEnabled();
            if (accessibilityEnabled) {
                accessibilityButton.callOnClick();
            }
        }

        final FooterButton footerButton = new FooterButton.Builder(this)
                .setText(R.string.wizard_next)
                .setListener(this::onNextButtonClick)
@@ -118,7 +129,7 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
        final Context context = getApplicationContext();
        final boolean didDisplayEdu = Settings.Secure.getIntForUser(context.getContentResolver(),
                FACE_UNLOCK_EDUCATION_INFO_DISPLAYED, OFF, mUserId) == ON;
        if (!didDisplayEdu) {
        if (!didDisplayEdu && !accessibilityEnabled) {
            Settings.Secure.putIntForUser(context.getContentResolver(),
                    FACE_UNLOCK_EDUCATION_INFO_DISPLAYED, ON, mUserId);
            footerButton.setEnabled(false);