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

Commit f11ff3cc authored by Andreas Miko's avatar Andreas Miko
Browse files

Make ENR getViewAtPosition calculation recursive

The guts of notifications within bundled groups would never open for
a long press because the calculation would always return the group ENR,
never its children. With this fix the getViewAtPosition from ENR is
recursively called such that the actual child can be found.

Bug: 389839492
Test: Opened guts for nested notification
Flag: com.android.systemui.notification_bundle_ui
Change-Id: I0a42621a9a548b3d952a54468d1d771907775e86
parent 9adbfe59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ public class ExpandableNotificationRowController implements NotifViewController
                if (com.android.systemui.Flags.msdlFeedback()) {
                    mMSDLPlayer.playToken(MSDLToken.LONG_PRESS, null);
                }
                // TODO(b/409748420): The BundleHeader Guts overrides individual notification Guts

                if (mView.isSummaryWithChildren() && !mView.isBundle()) {
                    mView.expandNotification();
                    return true;
+5 −1
Original line number Diff line number Diff line
@@ -1228,9 +1228,13 @@ public class NotificationChildrenContainer extends ViewGroup
            float top = childTop + Math.max(0, slidingChild.getClipTopAmount());
            float bottom = childTop + slidingChild.getActualHeight();
            if (y >= top && y <= bottom) {
                if (NotificationBundleUi.isEnabled()) {
                    return slidingChild.getViewAtPosition(y - top);
                } else {
                    return slidingChild;
                }
            }
        }
        return null;
    }