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

Commit 6cea7dc1 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Fix double back swipe not working

The keepMinimumAlpha check is not needed anymore since the closing target always keeps alpha at 1f during the pre-commit phase.

Bug: 346481208
Flag: com.android.systemui.predictive_back_system_anims
Test: Manual, i.e. verifying that double back swipe does trigger the second transition when the first transition has ended
Change-Id: I0c9b325e8047b760cf01fd7d931e4e1e2877d0b3
parent 584b3fe1
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -354,7 +354,7 @@ abstract class CrossActivityBackAnimation(
        matrix.postScale(scale, scale, scalePivotX, 0f)
        matrix.postTranslate(tempRectF.left, tempRectF.top)
        transaction
            .setAlpha(leash, keepMinimumAlpha(alpha))
            .setAlpha(leash, alpha)
            .setMatrix(leash, matrix, tmpFloat9)
            .setCrop(leash, cropRect)
            .setCornerRadius(leash, cornerRadius)
@@ -562,9 +562,6 @@ abstract class CrossActivityBackAnimation(
    }
}

// The target will loose focus when alpha == 0, so keep a minimum value for it.
private fun keepMinimumAlpha(transAlpha: Float) = max(transAlpha, 0.005f)

private fun isDarkMode(context: Context): Boolean {
    return context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK ==
        Configuration.UI_MODE_NIGHT_YES