From 3107cfacd34ded2508ab03c896e1ce894de0c795 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 22 Jul 2014 15:24:29 +0200 Subject: Fixed a bug with low priotity notification coloring When there where only low priority notifications, the topmost notification was not colored correctly. Bug: 16197778 Change-Id: I9fe8da79cfa78a3b94a3107c9e1af83b859a093e --- .../com/android/systemui/statusbar/stack/StackScrollAlgorithm.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com/android') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java index ee7206f..fe2733b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -171,7 +171,10 @@ public class StackScrollAlgorithm { for (int i = 0; i < childCount; i++) { View child = algorithmState.visibleChildren.get(i); StackScrollState.ViewState childViewState = resultState.getViewStateForView(child); - childViewState.belowSpeedBump = speedBumpIndex != -1 && i > speedBumpIndex; + + // The speed bump can also be gone, so equality needs to be taken when comparing + // indices. + childViewState.belowSpeedBump = speedBumpIndex != -1 && i >= speedBumpIndex; } } -- cgit v1.1