From 0acf430f12dfd48d340d0c0b30bd5a73c6838303 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 11 Jun 2019 12:43:03 -0700 Subject: [PATCH] Fixed an issue where the background was visible while pulsing We were using our own right instead of the current right to render the background. Fixes: 135042415 Test: atest SystemUITests Change-Id: I853d1ee4d2e9f8472c9786e3ce8f68ab605d1bcd --- .../stack/NotificationStackScrollLayout.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index b53fe3a795fc7..fb600ba83e067 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -868,8 +868,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd int backgroundRectTop = top; int lastSectionBottom = mSections[0].getCurrentBounds().bottom + animationYOffset; - int previousLeft = left; - int previousRight = right; + int currentLeft = left; + int currentRight = right; boolean first = true; for (NotificationSection section : mSections) { 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 // bad. if (sectionTop - lastSectionBottom > DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX - || (previousLeft != ownLeft && !first)) { - canvas.drawRoundRect(ownLeft, + || ((currentLeft != ownLeft || currentRight != ownRight) && !first)) { + canvas.drawRoundRect(currentLeft, backgroundRectTop, - ownRight, + currentRight, lastSectionBottom, mCornerRadius, mCornerRadius, mBackgroundPaint); backgroundRectTop = sectionTop; } - previousLeft = ownLeft; - previousRight = ownRight; + currentLeft = ownLeft; + currentRight = ownRight; lastSectionBottom = section.getCurrentBounds().bottom + animationYOffset; first = false; } - canvas.drawRoundRect(previousLeft, + canvas.drawRoundRect(currentLeft, backgroundRectTop, - previousRight, + currentRight, lastSectionBottom, mCornerRadius, mCornerRadius, mBackgroundPaint); }