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

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

Merge "Fix lingering sfps indicator" into main

parents 471dbcc8 5d6410e2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -121,11 +121,13 @@ constructor(
            if (it.isAttachedToWindow) {
                lottie = it.requireViewById<LottieAnimationView>(R.id.sidefps_animation)
                lottie?.pauseAnimation()
                lottie?.removeAllLottieOnCompositionLoadedListener()
                windowManager.get().removeView(it)
            }
        }

        overlayView = layoutInflater.get().inflate(R.layout.sidefps_view, null, false)

        val overlayViewModel =
            SideFpsOverlayViewModel(
                applicationContext,
@@ -163,9 +165,11 @@ constructor(

                val lottie = it.requireViewById<LottieAnimationView>(R.id.sidefps_animation)
                lottie.addLottieOnCompositionLoadedListener { composition: LottieComposition ->
                    if (overlayView.visibility != View.VISIBLE) {
                        viewModel.setLottieBounds(composition.bounds)
                        overlayView.visibility = View.VISIBLE
                    }
                }
                it.alpha = 0f
                val overlayShowAnimator =
                    it.animate()