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

Commit 63a13925 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [9231374, 9231389, 9231390, 9231391, 9231375, 9231286,...

Merge cherrypicks of [9231374, 9231389, 9231390, 9231391, 9231375, 9231286, 9231355, 9231376, 9231420, 9231462, 9231356, 9231421, 9231422, 9231402, 9231537, 9231557, 9231440, 9231441, 9231287, 9231288, 9231463, 9231464, 9231465, 9231423, 9231289, 9231392, 9230416, 9231466] into qt-c2f2-release

Change-Id: I06a53fb0bfdb3588367768bd06aaaa8a6f94b83d
parents 25144933 e3213d4b
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.settings.biometrics.face;

import static android.provider.Settings.Secure.FACE_UNLOCK_EDUCATION_INFO_DISPLAYED;
import static android.security.KeyStore.getApplicationContext;

import android.app.settings.SettingsEnums;
@@ -50,8 +49,6 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
    private static final String TAG = "FaceEducation";
    private static final int ON = 1;
    private static final int OFF = 0;
    // 8 seconds.
    private static final long FACE_ENROLL_EDUCATION_DELAY = 3000;

    private FaceManager mFaceManager;
    private FaceEnrollAccessibilityToggle mSwitchDiversity;
@@ -140,21 +137,9 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
                    && accessibilityManager.isTouchExplorationEnabled();
        }
        mFooterBarMixin.setPrimaryButton(footerButton);
        final Context context = getApplicationContext();
        final boolean didDisplayEdu = Settings.Secure.getIntForUser(context.getContentResolver(),
                FACE_UNLOCK_EDUCATION_INFO_DISPLAYED, OFF, mUserId) == ON;
        if (!didDisplayEdu && !accessibilityEnabled) {
            Settings.Secure.putIntForUser(context.getContentResolver(),
                    FACE_UNLOCK_EDUCATION_INFO_DISPLAYED, ON, mUserId);
            footerButton.setEnabled(false);
            mHandler.postDelayed(() -> {
                footerButton.setEnabled(true);
            }, FACE_ENROLL_EDUCATION_DELAY);
        }

        final Button accessibilityButton = findViewById(R.id.accessibility_button);
        accessibilityButton.setOnClickListener(view -> {
            footerButton.setEnabled(true);
            mSwitchDiversity.setChecked(true);
            accessibilityButton.setVisibility(View.GONE);
            mSwitchDiversity.setVisibility(View.VISIBLE);