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

Commit fb809cc7 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Fix scrim offset to (0,0) for letterboxed cross-activity-back

When the cross-activity-back animation was played for a letterboxed app which was placed in the bottom half of split screen, the scrim was wrongly placed in the upper half.

Bug: 328446606
Flag: ACONFIG com.android.systemui.predictive_back_system_anims NEXTFOOD
Test: Manual, i.e. testing back animation in letterboxed app which is placed in the bottom half of split screen
Change-Id: I8fa17deda8daffcb708b07073ac9d378d69a1195
parent fe04f72d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -283,7 +283,11 @@ class CrossActivityBackAnimation @Inject constructor(
        scrimLayer = scrimBuilder.build()
        val colorComponents = floatArrayOf(0f, 0f, 0f)
        maxScrimAlpha = if (isDarkTheme) MAX_SCRIM_ALPHA_DARK else MAX_SCRIM_ALPHA_LIGHT
        val scrimCrop = if (isLetterboxed) backAnimRect else closingTarget!!.localBounds
        val scrimCrop = if (isLetterboxed) {
            closingTarget!!.windowConfiguration.bounds
        } else {
            closingTarget!!.localBounds
        }
        transaction
            .setColor(scrimLayer, colorComponents)
            .setAlpha(scrimLayer!!, maxScrimAlpha)