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

Commit 3f37924a authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "For non-udfps, detectFP if primaryAuth required" into tm-qpr-dev am: a94c4e12

parents c6fc223c a94c4e12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ data class KeyguardFingerprintListenModel(
    val credentialAttempted: Boolean,
    val deviceInteractive: Boolean,
    val dreaming: Boolean,
    val encryptedOrLockdown: Boolean,
    val fingerprintDisabled: Boolean,
    val fingerprintLockedOut: Boolean,
    val goingToSleep: Boolean,
@@ -37,6 +36,7 @@ data class KeyguardFingerprintListenModel(
    val primaryUser: Boolean,
    val shouldListenSfpsState: Boolean,
    val shouldListenForFingerprintAssistant: Boolean,
    val strongerAuthRequired: Boolean,
    val switchingUser: Boolean,
    val udfps: Boolean,
    val userDoesNotHaveTrust: Boolean
+5 −3
Original line number Diff line number Diff line
@@ -363,16 +363,18 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
        final boolean sfpsEnabled = getResources().getBoolean(
                R.bool.config_show_sidefps_hint_on_bouncer);
        final boolean fpsDetectionRunning = mUpdateMonitor.isFingerprintDetectionRunning();
        final boolean needsStrongAuth = mUpdateMonitor.userNeedsStrongAuth();
        final boolean isUnlockingWithFpAllowed =
                mUpdateMonitor.isUnlockingWithFingerprintAllowed();

        boolean toShow = mBouncerVisible && sfpsEnabled && fpsDetectionRunning && !needsStrongAuth;
        boolean toShow = mBouncerVisible && sfpsEnabled && fpsDetectionRunning
                && isUnlockingWithFpAllowed;

        if (DEBUG) {
            Log.d(TAG, "sideFpsToShow=" + toShow + ", "
                    + "mBouncerVisible=" + mBouncerVisible + ", "
                    + "configEnabled=" + sfpsEnabled + ", "
                    + "fpsDetectionRunning=" + fpsDetectionRunning + ", "
                    + "needsStrongAuth=" + needsStrongAuth);
                    + "isUnlockingWithFpAllowed=" + isUnlockingWithFpAllowed);
        }
        if (toShow) {
            mSideFpsController.get().show(SideFpsUiRequestSource.PRIMARY_BOUNCER);
+92 −59

File changed.

Preview size limit exceeded, changes collapsed.

+5 −5
Original line number Diff line number Diff line
@@ -116,9 +116,9 @@ class AuthRippleController @Inject constructor(
        notificationShadeWindowController.setForcePluginOpen(false, this)
    }

    fun showUnlockRipple(biometricSourceType: BiometricSourceType?) {
    fun showUnlockRipple(biometricSourceType: BiometricSourceType) {
        if (!keyguardStateController.isShowing ||
            keyguardUpdateMonitor.userNeedsStrongAuth()) {
                !keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(biometricSourceType)) {
            return
        }

@@ -246,7 +246,7 @@ class AuthRippleController @Inject constructor(
        object : KeyguardUpdateMonitorCallback() {
            override fun onBiometricAuthenticated(
                userId: Int,
                biometricSourceType: BiometricSourceType?,
                biometricSourceType: BiometricSourceType,
                isStrongBiometric: Boolean
            ) {
                if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
@@ -255,14 +255,14 @@ class AuthRippleController @Inject constructor(
                showUnlockRipple(biometricSourceType)
            }

        override fun onBiometricAuthFailed(biometricSourceType: BiometricSourceType?) {
        override fun onBiometricAuthFailed(biometricSourceType: BiometricSourceType) {
            if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
                mView.retractDwellRipple()
            }
        }

        override fun onBiometricAcquired(
            biometricSourceType: BiometricSourceType?,
            biometricSourceType: BiometricSourceType,
            acquireInfo: Int
        ) {
            if (biometricSourceType == BiometricSourceType.FINGERPRINT &&
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.domain.interactor

import android.content.res.ColorStateList
import android.hardware.biometrics.BiometricSourceType
import android.os.Handler
import android.os.Trace
import android.os.UserHandle
@@ -71,7 +72,7 @@ constructor(
                KeyguardUpdateMonitor.getCurrentUser()
            ) &&
            !needsFullscreenBouncer() &&
            !keyguardUpdateMonitor.userNeedsStrongAuth() &&
            keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(BiometricSourceType.FACE) &&
            !keyguardBypassController.bypassEnabled

    /** Runnable to show the primary bouncer. */
Loading