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

Commit c2c8acf5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove QSPanel bounds after expansion animation."

parents 5f56cadf acd021ee
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -285,19 +285,24 @@ public class QSFragment extends Fragment implements QS {
        int heightDiff = mQSPanel.getBottom() - mHeader.getBottom() + mHeader.getPaddingBottom()
                + mFooter.getHeight();
        mQSPanel.setTranslationY(translationScaleY * heightDiff);
        mQSDetail.setFullyExpanded(expansion == 1);

        if (mQSAnimator != null) {
            mQSAnimator.setPosition(expansion);
        }

        // Set bounds on the QS panel so it doesn't run over the header.
        boolean fullyExpanded = expansion == 1;
        mQSDetail.setFullyExpanded(fullyExpanded);
        if (fullyExpanded) {
            // Always draw within the bounds of the view when fully expanded.
            mQSPanel.setClipBounds(null);
        } else {
            // Set bounds on the QS panel so it doesn't run over the header when animating.
            mQsBounds.top = (int) -mQSPanel.getTranslationY();
            mQsBounds.right = mQSPanel.getWidth();
            mQsBounds.bottom = mQSPanel.getHeight();
            mQSPanel.setClipBounds(mQsBounds);
        }

        if (mQSAnimator != null) {
            mQSAnimator.setPosition(expansion);
        }
    }

    @Override
    public void animateHeaderSlidingIn(long delay) {
        if (DEBUG) Log.d(TAG, "animateHeaderSlidingIn");