Merge "Remove unneeded isShadeOpening check when clipping bottom HUN" into tm-dev am: c2da1090e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17189706 Change-Id: If18c66f3a913d7f56e53467745d1de0ae8377c5d
This commit is contained in:
@@ -202,12 +202,10 @@ public class StackScrollAlgorithm {
|
|||||||
float newHeight = state.height;
|
float newHeight = state.height;
|
||||||
float newNotificationEnd = newYTranslation + newHeight;
|
float newNotificationEnd = newYTranslation + newHeight;
|
||||||
boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned();
|
boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned();
|
||||||
final boolean shadeClosedWithHUN =
|
|
||||||
ambientState.isShadeOpening() && !ambientState.isShadeExpanded();
|
|
||||||
if (mClipNotificationScrollToTop
|
if (mClipNotificationScrollToTop
|
||||||
&& (!state.inShelf || (isHeadsUp && !firstHeadsUp))
|
&& (!state.inShelf || (isHeadsUp && !firstHeadsUp))
|
||||||
&& newYTranslation < clipStart
|
&& newYTranslation < clipStart
|
||||||
&& shadeClosedWithHUN) {
|
&& !ambientState.isShadeExpanded()) {
|
||||||
// The previous view is overlapping on top, clip!
|
// The previous view is overlapping on top, clip!
|
||||||
float overlapAmount = clipStart - newYTranslation;
|
float overlapAmount = clipStart - newYTranslation;
|
||||||
state.clipTopAmount = (int) overlapAmount;
|
state.clipTopAmount = (int) overlapAmount;
|
||||||
|
|||||||
Reference in New Issue
Block a user