diff options
| author | 2022-07-21 01:45:45 +0000 | |
|---|---|---|
| committer | 2022-07-21 01:45:45 +0000 | |
| commit | 065d85ea8586779606b835cae14661b8f58f3b13 (patch) | |
| tree | f977a22e91e00cc83f9e6588e83f6874cec8e02b | |
| parent | 727b4386db2173c6ef46d007e28f5d67ac0b0b50 (diff) | |
| parent | d0cd38bc4141a532ec124c71f2bbeca8289d714c (diff) | |
Merge "Require InteractionJankMonitor." into tm-qpr-dev
| -rw-r--r-- | packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt index 47f448d503c6..eb000ad312d7 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt @@ -49,17 +49,16 @@ private const val TAG = "GhostedViewLaunchAnimatorController" * Note: Avoid instantiating this directly and call [ActivityLaunchAnimator.Controller.fromView] * whenever possible instead. */ -open class GhostedViewLaunchAnimatorController( +open class GhostedViewLaunchAnimatorController @JvmOverloads constructor( /** The view that will be ghosted and from which the background will be extracted. */ private val ghostedView: View, /** The [InteractionJankMonitor.CujType] associated to this animation. */ private val cujType: Int? = null, - private var interactionJankMonitor: InteractionJankMonitor? = null + private var interactionJankMonitor: InteractionJankMonitor = + InteractionJankMonitor.getInstance(), ) : ActivityLaunchAnimator.Controller { - constructor(view: View, type: Int) : this(view, type, null) - /** The container to which we will add the ghost view and expanding background. */ override var launchContainer = ghostedView.rootView as ViewGroup private val launchContainerOverlay: ViewGroupOverlay @@ -203,7 +202,7 @@ open class GhostedViewLaunchAnimatorController( val matrix = ghostView?.animationMatrix ?: Matrix.IDENTITY_MATRIX matrix.getValues(initialGhostViewMatrixValues) - cujType?.let { interactionJankMonitor?.begin(ghostedView, it) } + cujType?.let { interactionJankMonitor.begin(ghostedView, it) } } override fun onLaunchAnimationProgress( @@ -289,7 +288,7 @@ open class GhostedViewLaunchAnimatorController( return } - cujType?.let { interactionJankMonitor?.end(it) } + cujType?.let { interactionJankMonitor.end(it) } backgroundDrawable?.wrapped?.alpha = startBackgroundAlpha |