Merge "Fixed an issue where the background was visible while pulsing" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-06-11 22:55:02 +00:00
committed by Android (Google) Code Review

View File

@@ -868,8 +868,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
int backgroundRectTop = top; int backgroundRectTop = top;
int lastSectionBottom = int lastSectionBottom =
mSections[0].getCurrentBounds().bottom + animationYOffset; mSections[0].getCurrentBounds().bottom + animationYOffset;
int previousLeft = left; int currentLeft = left;
int previousRight = right; int currentRight = right;
boolean first = true; boolean first = true;
for (NotificationSection section : mSections) { for (NotificationSection section : mSections) {
if (section.getFirstVisibleChild() == null) { if (section.getFirstVisibleChild() == null) {
@@ -882,23 +882,23 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
// as separate roundrects, as the rounded corners right next to each other look // as separate roundrects, as the rounded corners right next to each other look
// bad. // bad.
if (sectionTop - lastSectionBottom > DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX if (sectionTop - lastSectionBottom > DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX
|| (previousLeft != ownLeft && !first)) { || ((currentLeft != ownLeft || currentRight != ownRight) && !first)) {
canvas.drawRoundRect(ownLeft, canvas.drawRoundRect(currentLeft,
backgroundRectTop, backgroundRectTop,
ownRight, currentRight,
lastSectionBottom, lastSectionBottom,
mCornerRadius, mCornerRadius, mBackgroundPaint); mCornerRadius, mCornerRadius, mBackgroundPaint);
backgroundRectTop = sectionTop; backgroundRectTop = sectionTop;
} }
previousLeft = ownLeft; currentLeft = ownLeft;
previousRight = ownRight; currentRight = ownRight;
lastSectionBottom = lastSectionBottom =
section.getCurrentBounds().bottom + animationYOffset; section.getCurrentBounds().bottom + animationYOffset;
first = false; first = false;
} }
canvas.drawRoundRect(previousLeft, canvas.drawRoundRect(currentLeft,
backgroundRectTop, backgroundRectTop,
previousRight, currentRight,
lastSectionBottom, lastSectionBottom,
mCornerRadius, mCornerRadius, mBackgroundPaint); mCornerRadius, mCornerRadius, mBackgroundPaint);
} }