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

Commit a8ec65d7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Check for UDFPS finger down for face auth device entry" into tm-d1-dev...

Merge "Check for UDFPS finger down for face auth device entry" into tm-d1-dev am: bf6c65b9 am: 5c1de735 am: e6ff662d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18494045



Change-Id: Ia3d428ed36e56c651412e90aaae8873e903eba4c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 37ca4345 e6ff662d
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -1555,9 +1555,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                public void onUdfpsPointerDown(int sensorId) {
                    Log.d(TAG, "onUdfpsPointerDown, sensorId: " + sensorId);
                    requestFaceAuth(true);
                    if (isFaceDetectionRunning()) {
                        mKeyguardBypassController.setUserHasDeviceEntryIntent(true);
                    }
                }

                /**
@@ -1590,9 +1587,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                                "faceFailure-" + reason);

                    handleFaceAuthFailed();
                    if (mKeyguardBypassController != null) {
                        mKeyguardBypassController.setUserHasDeviceEntryIntent(false);
                    }
                }

                @Override
@@ -1600,10 +1594,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                    Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationSucceeded");
                    handleFaceAuthenticated(result.getUserId(), result.isStrongBiometric());
                    Trace.endSection();

                    if (mKeyguardBypassController != null) {
                        mKeyguardBypassController.setUserHasDeviceEntryIntent(false);
                    }
                }

                @Override
@@ -1614,9 +1604,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                @Override
                public void onAuthenticationError(int errMsgId, CharSequence errString) {
                    handleFaceError(errMsgId, errString.toString());
                    if (mKeyguardBypassController != null) {
                        mKeyguardBypassController.setUserHasDeviceEntryIntent(false);
                    }

                    if (mActiveUnlockConfig.shouldRequestActiveUnlockOnFaceError(errMsgId)) {
                        requestActiveUnlock(
@@ -2299,10 +2286,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        updateFaceListeningState(BIOMETRIC_ACTION_START);
    }

    public boolean isFaceAuthUserRequested() {
        return mIsFaceAuthUserRequested;
    }

    /**
     * In case face auth is running, cancel it.
     */
@@ -3163,11 +3146,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
            mSecureCameraLaunched = false;
        }

        if (mKeyguardBypassController != null) {
            // LS visibility has changed, so reset deviceEntryIntent
            mKeyguardBypassController.setUserHasDeviceEntryIntent(false);
        }

        for (int i = 0; i < mCallbacks.size(); i++) {
            KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
            if (cb != null) {
+1 −1
Original line number Diff line number Diff line
@@ -582,7 +582,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
                mUpdateMonitor.isUnlockingWithBiometricAllowed(isStrongBiometric);
        boolean deviceDreaming = mUpdateMonitor.isDreaming();
        boolean bypass = mKeyguardBypassController.getBypassEnabled()
                || mKeyguardBypassController.getUserHasDeviceEntryIntent();
                || mAuthController.isUdfpsFingerDown();
        if (!mUpdateMonitor.isDeviceInteractive()) {
            if (!mKeyguardViewController.isShowing()) {
                return bypass ? MODE_WAKE_AND_UNLOCK : MODE_ONLY_WAKE;
+0 −2
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ open class KeyguardBypassController : Dumpable, StackScrollAlgorithm.BypassContr
    private var hasFaceFeature: Boolean
    private var pendingUnlock: PendingUnlock? = null
    private val listeners = mutableListOf<OnBypassStateChangedListener>()
    var userHasDeviceEntryIntent: Boolean = false // ie: attempted udfps auth

    private val faceAuthEnabledChangedCallback = object : KeyguardStateController.Callback {
        override fun onFaceAuthEnabledChanged() = notifyListeners()
@@ -217,7 +216,6 @@ open class KeyguardBypassController : Dumpable, StackScrollAlgorithm.BypassContr
        pw.println("  launchingAffordance: $launchingAffordance")
        pw.println("  qSExpanded: $qSExpanded")
        pw.println("  hasFaceFeature: $hasFaceFeature")
        pw.println("  userHasDeviceEntryIntent: $userHasDeviceEntryIntent")
    }

    /** Registers a listener for bypass state changes. */