Skip to content

Commit f92a1fd

Browse files
author
Selim Cinek
committed
Fixed a bug where notifications shadows were blinking out
Bug: 22567770 Change-Id: I2d335241a287d0c64e659221994f19b7c13eccd3
1 parent 00ab357 commit f92a1fd

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,11 @@ public boolean areChildrenExpanded() {
374374
}
375375

376376
private void updateClipping() {
377-
mClipRect.set(0, mClipTopOptimization, getWidth(), getActualHeight());
377+
int top = mClipTopOptimization;
378+
if (top >= getActualHeight()) {
379+
top = getActualHeight() - 1;
380+
}
381+
mClipRect.set(0, top, getWidth(), getActualHeight());
378382
setClipBounds(mClipRect);
379383
}
380384

packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,9 @@ private void updatePositionsForState(StackScrollState resultState,
413413
ExpandableNotificationRow topHeadsUpEntry = ambientState.getTopHeadsUpEntry();
414414

415415
int childCount = algorithmState.visibleChildren.size();
416-
int numberOfElementsCompletelyIn = (int) algorithmState.itemsInTopStack;
416+
int numberOfElementsCompletelyIn = algorithmState.partialInTop == 1.0f
417+
? algorithmState.lastTopStackIndex
418+
: (int) algorithmState.itemsInTopStack;
417419
for (int i = 0; i < childCount; i++) {
418420
ExpandableView child = algorithmState.visibleChildren.get(i);
419421
StackViewState childViewState = resultState.getViewStateForView(child);

0 commit comments

Comments
 (0)