Merge "Fix clipTopAmount when read in 2 more critical places" into tm-dev am: 8d2aafe801 am: f796907b87

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18530877

Change-Id: I473bebd3a3e231905ea036955e38568376f60bc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jeff DeCew
2022-05-23 23:01:05 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 2 deletions

View File

@@ -421,7 +421,7 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable {
outRect.top += getTop() + getTranslationY();
}
outRect.bottom = outRect.top + getActualHeight();
outRect.top += getClipTopAmount();
outRect.top += Math.max(0, getClipTopAmount());
}
public boolean isSummaryWithChildren() {

View File

@@ -855,7 +855,7 @@ public class NotificationChildrenContainer extends ViewGroup
for (int childIdx = 0; childIdx < count; childIdx++) {
ExpandableNotificationRow slidingChild = mAttachedChildren.get(childIdx);
float childTop = slidingChild.getTranslationY();
float top = childTop + slidingChild.getClipTopAmount();
float top = childTop + Math.max(0, slidingChild.getClipTopAmount());
float bottom = childTop + slidingChild.getActualHeight();
if (y >= top && y <= bottom) {
return slidingChild;