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

Commit b4a8d579 authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge changes I2fa65afb,I29e86af7 into main

* changes:
  NSSL Debug lines now also draws the clip path
  Dump NSSL clipping state
parents 3825ffc7 ba78a04c
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -812,6 +812,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        } else {
            mDebugTextUsedYPositions.clear();
        }

        mDebugPaint.setColor(Color.DKGRAY);
        canvas.drawPath(mRoundedClipPath, mDebugPaint);

        int y = 0;
        drawDebugInfo(canvas, y, Color.RED, /* label= */ "y = " + y);

@@ -843,14 +847,14 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        drawDebugInfo(canvas, y, Color.LTGRAY,
                /* label= */ "mAmbientState.getStackY() + mAmbientState.getStackHeight() = " + y);

        y = (int) mAmbientState.getStackY() + mContentHeight;
        drawDebugInfo(canvas, y, Color.MAGENTA,
                /* label= */ "mAmbientState.getStackY() + mContentHeight = " + y);

        y = (int) (mAmbientState.getStackY() + mIntrinsicContentHeight);
        drawDebugInfo(canvas, y, Color.YELLOW,
                /* label= */ "mAmbientState.getStackY() + mIntrinsicContentHeight = " + y);

        y = mContentHeight;
        drawDebugInfo(canvas, y, Color.MAGENTA,
                /* label= */ "mContentHeight = " + y);

        drawDebugInfo(canvas, mRoundedRectClippingBottom, Color.DKGRAY,
                /* label= */ "mRoundedRectClippingBottom) = " + y);
    }
@@ -4940,6 +4944,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            println(pw, "intrinsicPadding", mIntrinsicPadding);
            println(pw, "topPadding", mTopPadding);
            println(pw, "bottomPadding", mBottomPadding);
            dumpRoundedRectClipping(pw);
            println(pw, "requestedClipBounds", mRequestedClipBounds);
            println(pw, "isClipped", mIsClipped);
            println(pw, "translationX", getTranslationX());
            println(pw, "translationY", getTranslationY());
            println(pw, "translationZ", getTranslationZ());
@@ -4994,6 +5001,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
                });
    }

    private void dumpRoundedRectClipping(IndentingPrintWriter pw) {
        pw.append("roundedRectClipping{l=").print(mRoundedRectClippingLeft);
        pw.append(" t=").print(mRoundedRectClippingTop);
        pw.append(" r=").print(mRoundedRectClippingRight);
        pw.append(" b=").print(mRoundedRectClippingBottom);
        pw.append("} topRadius=").print(mBgCornerRadii[0]);
        pw.append(" bottomRadius=").println(mBgCornerRadii[4]);
    }

    private void dumpFooterViewVisibility(IndentingPrintWriter pw) {
        FooterViewRefactor.assertInLegacyMode();
        final boolean showDismissView = shouldShowDismissView();