diff options
| -rw-r--r-- | packages/SystemUI/compose/core/src/com/android/compose/animation/ExpandableController.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/SystemUI/compose/core/src/com/android/compose/animation/ExpandableController.kt b/packages/SystemUI/compose/core/src/com/android/compose/animation/ExpandableController.kt index 767756e17747..17c74ba7b12f 100644 --- a/packages/SystemUI/compose/core/src/com/android/compose/animation/ExpandableController.kt +++ b/packages/SystemUI/compose/core/src/com/android/compose/animation/ExpandableController.kt @@ -263,9 +263,11 @@ internal class ExpandableControllerImpl( override fun onLaunchAnimationStart(isExpandingFullyAbove: Boolean) { delegate.onLaunchAnimationStart(isExpandingFullyAbove) overlay.value = composeViewRoot.rootView.overlay as ViewGroupOverlay + cujType?.let { InteractionJankMonitor.getInstance().begin(composeViewRoot, it) } } override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) { + cujType?.let { InteractionJankMonitor.getInstance().end(it) } delegate.onLaunchAnimationEnd(isExpandingFullyAbove) overlay.value = null } @@ -320,9 +322,8 @@ internal class ExpandableControllerImpl( } override fun jankConfigurationBuilder(): InteractionJankMonitor.Configuration.Builder? { - // TODO(b/252723237): Add support for jank monitoring when animating from a - // Composable. - return null + val type = cuj?.cujType ?: return null + return InteractionJankMonitor.Configuration.Builder.withView(type, composeViewRoot) } } } |