Merge "Fix notification top clipping" into sc-dev

This commit is contained in:
Lucas Dupin
2021-04-27 04:12:29 +00:00
committed by Android (Google) Code Review

View File

@@ -151,9 +151,7 @@ public class StackScrollAlgorithm {
private void updateClipping(StackScrollAlgorithmState algorithmState,
AmbientState ambientState) {
float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding()
+ ambientState.getStackTranslation()
: 0;
float drawStart = !ambientState.isOnKeyguard() ? ambientState.getStackY() : 0;
float clipStart = 0;
int childCount = algorithmState.visibleChildren.size();
boolean firstHeadsUp = true;
@@ -166,8 +164,7 @@ public class StackScrollAlgorithm {
float newYTranslation = state.yTranslation;
float newHeight = state.height;
float newNotificationEnd = newYTranslation + newHeight;
boolean isHeadsUp = (child instanceof ExpandableNotificationRow)
&& ((ExpandableNotificationRow) child).isPinned();
boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned();
if (mClipNotificationScrollToTop
&& (!state.inShelf || (isHeadsUp && !firstHeadsUp))
&& newYTranslation < clipStart