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

Commit 01961933 authored by Grace Cheng's avatar Grace Cheng Committed by Android (Google) Code Review
Browse files

Merge "Cleanup SFPS indicator code" into main

parents f6a23c64 7d42eee8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ constructor(
            field?.let { oldView ->
                val lottie = oldView.requireViewById(R.id.sidefps_animation) as LottieAnimationView
                lottie.pauseAnimation()
                lottie.removeAllLottieOnCompositionLoadedListener()
                windowManager.removeView(oldView)
                orientationListener.disable()
            }
@@ -288,7 +289,7 @@ constructor(
    }

    private fun onOrientationChanged(@BiometricRequestConstants.RequestReason reason: Int) {
        if (overlayView != null) {
        if (overlayView?.isAttachedToWindow == true) {
            createOverlayForDisplay(reason)
        }
    }
@@ -322,7 +323,7 @@ constructor(
        )
        lottie.addLottieOnCompositionLoadedListener {
            // Check that view is not stale, and that overlayView has not been hidden/removed
            if (overlayView != null && overlayView == view) {
            if (overlayView?.isAttachedToWindow == true && overlayView == view) {
                updateOverlayParams(display, it.bounds)
            }
        }
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import com.android.systemui.biometrics.shared.model.AuthenticationReason.Setting
import com.android.systemui.keyguard.shared.model.FingerprintAuthenticationStatus
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map

/** Encapsulates business logic for interacting with biometric authentication state. */
@@ -52,7 +53,7 @@ constructor(
            } else {
                AuthenticationReason.NotRunning
            }
        }
        }.distinctUntilChanged()

    override val fingerprintAcquiredStatus: Flow<FingerprintAuthenticationStatus> =
        biometricStatusRepository.fingerprintAcquiredStatus