diff options
| author | 2023-09-18 15:11:01 +0000 | |
|---|---|---|
| committer | 2023-09-18 15:11:01 +0000 | |
| commit | fe0f2dd3c25db2f37bd376e586e8a4608503f33c (patch) | |
| tree | 8f82e2d9b7a96ac5256533030f68b244831bbaed | |
| parent | 4ebc884d74126a0b3b4330a4f7a4f46e70dab177 (diff) | |
| parent | d6bbc6c22ba2ea5c867123343822278c74f1c3fb (diff) | |
Merge "Instrument dialog/app launches when animating from Compose UIs" into main
| -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) } } } |