Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07381950 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix clipTopAmount when read in 2 more critical places

* When determining the size of the rectangle made available for the a11y services (e.g. talkback)
* When determining which child view is being touched by our custom logic

Test: reproduce the bug, then navigate the screen with talkback; notice that the rectangle is correctly sized
Bug: 230080345
Change-Id: I01293c0aecbeee559e97f348ff7c4151a64538ab
parent 34b4ebd8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -422,7 +422,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() {
+1 −1
Original line number Diff line number Diff line
@@ -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;