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

Commit f26007d5 authored by Liana Kazanova (xWF)'s avatar Liana Kazanova (xWF) Committed by Android (Google) Code Review
Browse files

Revert "Don't draw QS if not visible"

This reverts commit 98a0d855.

Reason for revert: DroidMonitor: Reverting due to http://b/413411524 Jank issue. 

Bug: 413411524
Change-Id: I58c99334a8e002a950b38d3d3da208dbdbb67309
parent 98a0d855
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -472,7 +472,6 @@ constructor(
    }

    override fun setQsVisible(qsVisible: Boolean) {
        containerView?.qsVisible = qsVisible
        viewModel.isQsVisible = qsVisible
    }

@@ -1155,14 +1154,6 @@ private class FrameLayoutTouchPassthrough(
            }
        }

    var qsVisible: Boolean = false
        set(value) {
            if (value != field) {
                field = value
                invalidate()
            }
        }

    private var dirtyClipData = false

    private val clipEnabled
@@ -1201,14 +1192,8 @@ private class FrameLayoutTouchPassthrough(
            canvas.clipOutPath(currentClippingPath)
            canvas.translate(0f, translationY)
        }
        if (qsVisible) {
            // If QS should not be visible, there's no need to draw this tree at all. We do this
            // in the view (instead of in compose) so it's completely synchronized with the clip.
            // As this FrameLayout doesn't have any content, and the ComposeView is the only child,
            // this is equivalent to blocking the draw in `drawChild`.
        super.dispatchDraw(canvas)
    }
    }

    override fun isTransformedTouchPointInView(
        x: Float,