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

Unverified Commit e034bcd2 authored by LuK1337's avatar LuK1337
Browse files

SystemUI: Restore 14 QPR1 FingerprintInteractiveToAuth handling

NOTE: This is modified to allow interactive to auth for all non-udfps
sensors.

Change-Id: I169435e755c68433955f5f6185c3fa74400fca64
parent 56d09f61
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2773,9 +2773,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                && !strongerAuthRequired
                && userDoesNotHaveTrust);

        final boolean shouldListenFpsState = !isUdfps
                && (mFingerprintInteractiveToAuthProvider == null
                        || !mFingerprintInteractiveToAuthProvider.isEnabled(user)
                        || (isDeviceInteractive() && !mGoingToSleep));

        boolean shouldListen = shouldListenKeyguardState && shouldListenUserState
                && shouldListenBouncerState && shouldListenUdfpsState && !mBiometricPromptShowing;
                && shouldListenBouncerState && shouldListenUdfpsState && !mBiometricPromptShowing
                && shouldListenFpsState;
        logListenerModelData(
                new KeyguardFingerprintListenModel(
                    System.currentTimeMillis(),
+6 −0
Original line number Diff line number Diff line
@@ -36,4 +36,10 @@ interface FingerprintInteractiveToAuthProvider {
     * @return Vendor extension if needed for authentication.
     */
    fun getVendorExtension(userId: Int): AuthenticateReason.Vendor?

    /**
     * @param userId the user Id.
     * @return true if the InteractiveToAuthFeature is enabled, false if disabled.
     */
    fun isEnabled(userId: Int): Boolean
}
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ class FingerprintInteractiveToAuthProviderImpl @Inject constructor(

    override fun getVendorExtension(userId: Int): AuthenticateReason.Vendor? = null

    private fun isEnabled(userId: Int): Boolean {
    override fun isEnabled(userId: Int): Boolean {
        var value = Settings.Secure.getIntForUser(
            context.contentResolver,
            Settings.Secure.SFPS_PERFORMANT_AUTH_ENABLED,