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

Commit c900b711 authored by Evan Laird's avatar Evan Laird Committed by Android (Google) Code Review
Browse files

Merge "[Ongoing call] Fix chip clip when using activity launch animator" into main

parents 8a6362c2 6b9bba4c
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ constructor(
    override var launchContainer = ghostedView.rootView as ViewGroup
    private val launchContainerOverlay: ViewGroupOverlay
        get() = launchContainer.overlay

    private val launchContainerLocation = IntArray(2)

    /** The ghost view that is drawn and animated instead of the ghosted view. */
@@ -206,9 +207,8 @@ constructor(
            return
        }

        backgroundView = FrameLayout(launchContainer.context).also {
            launchContainerOverlay.add(it)
        }
        backgroundView =
            FrameLayout(launchContainer.context).also { launchContainerOverlay.add(it) }

        // We wrap the ghosted view background and use it to draw the expandable background. Its
        // alpha will be set to 0 as soon as we start drawing the expanding background.
@@ -226,6 +226,17 @@ constructor(
        // the content before fading out the background.
        ghostView = GhostView.addGhost(ghostedView, launchContainer)

        // [GhostView.addGhost], the result of which is our [ghostView], creates a [GhostView], and
        // adds it first to a [FrameLayout] container. It then adds _that_ container to an
        // [OverlayViewGroup]. We need to turn off clipping for that container view. Currently,
        // however, the only way to get a reference to that overlay is by going through our
        // [ghostView]. The [OverlayViewGroup] will always be its grandparent view.
        // TODO(b/306652954) reference the overlay view group directly if we can
        (ghostView?.parent?.parent as? ViewGroup)?.let {
            it.clipChildren = false
            it.clipToPadding = false
        }

        val matrix = ghostView?.animationMatrix ?: Matrix.IDENTITY_MATRIX
        matrix.getValues(initialGhostViewMatrixValues)