Fixed the visual appearance on heads-up notifications

Previously the wrong notifications were displayed on top
which could lead to heads-up notifications appearing
halfway.

Test: manual, add 2 heads-up see that the correct one is displayed
Change-Id: I723474e2fe1586e2011a9808f8b8c77a706a6070
Fixes: 36549554
This commit is contained in:
Selim Cinek
2017-04-06 16:46:34 -07:00
parent aca84c0b2a
commit daab6f5dbf

View File

@@ -495,12 +495,12 @@ public class StackScrollAlgorithm {
int childCount = algorithmState.visibleChildren.size();
float childrenOnTop = 0.0f;
for (int i = childCount - 1; i >= 0; i--) {
updateChildZValue(i, childrenOnTop,
childrenOnTop = updateChildZValue(i, childrenOnTop,
resultState, algorithmState, ambientState);
}
}
protected void updateChildZValue(int i, float childrenOnTop,
protected float updateChildZValue(int i, float childrenOnTop,
StackScrollState resultState, StackScrollAlgorithmState algorithmState,
AmbientState ambientState) {
ExpandableView child = algorithmState.visibleChildren.get(i);
@@ -538,6 +538,7 @@ public class StackScrollAlgorithm {
} else {
childViewState.zTranslation = baseZ;
}
return childrenOnTop;
}
public void setIsExpanded(boolean isExpanded) {