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

Commit 7f4ca82f authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Align Element.isOpaque() with Element.computeValue()

See b/332586311#comment3 for details.

Bug: 332586311
Test: ElementTest
Flag: N/A
Change-Id: I52de4f67752672e2489d0566c7b778c95646a886
parent 2fe6f173
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -356,7 +356,9 @@ private fun isElementOpaque(
    val toState = element.sceneStates[toScene]

    if (fromState == null && toState == null) {
        error("This should not happen, element $element is neither in $fromScene or $toScene")
        // TODO(b/311600838): Throw an exception instead once layers of disposed elements are not
        // run anymore.
        return true
    }

    val isSharedElement = fromState != null && toState != null