diff options
| author | 2024-04-19 14:38:47 +0200 | |
|---|---|---|
| committer | 2024-04-19 14:41:06 +0200 | |
| commit | 7f4ca82f9b5713902c77d1d3537666e3d2557895 (patch) | |
| tree | d593eb3e1bc9af4c738feaa9a98f8b2cf9758e1d | |
| parent | 2fe6f1737c7dafdb2f982a8c30fbba9db5f49ed1 (diff) | |
Align Element.isOpaque() with Element.computeValue()
See b/332586311#comment3 for details.
Bug: 332586311
Test: ElementTest
Flag: N/A
Change-Id: I52de4f67752672e2489d0566c7b778c95646a886
| -rw-r--r-- | packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt index a8a1d881b907..59c10664a1ba 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt @@ -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 |