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

Commit 4423e581 authored by cecilia's avatar cecilia Committed by Cecilia Hong
Browse files

Bubbles up the long-press event from media rec item to the parent card.

Fixes: 194539523
Test: Local builds
Change-Id: I10fc0a80e8cada93fb3a8eb94d7103f48499b818
parent 9abebd21
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -254,7 +254,8 @@ public class MediaControlPanel {
                openGuts();
                openGuts();
                return true;
                return true;
            } else {
            } else {
                return false;
                closeGuts();
                return true;
            }
            }
        });
        });
        mRecommendationViewHolder.getCancel().setOnClickListener(v -> {
        mRecommendationViewHolder.getCancel().setOnClickListener(v -> {
@@ -587,6 +588,14 @@ public class MediaControlPanel {
            ViewGroup mediaCoverContainer = mediaCoverContainers.get(uiComponentIndex);
            ViewGroup mediaCoverContainer = mediaCoverContainers.get(uiComponentIndex);
            setSmartspaceRecItemOnClickListener(mediaCoverContainer, recommendation,
            setSmartspaceRecItemOnClickListener(mediaCoverContainer, recommendation,
                    uiComponentIndex);
                    uiComponentIndex);
            // Bubble up the long-click event to the card.
            mediaCoverContainer.setOnLongClickListener(v -> {
                View parent = (View) v.getParent();
                if (parent != null) {
                    parent.performLongClick();
                }
                return true;
            });


            // Set up the accessibility label for the media item.
            // Set up the accessibility label for the media item.
            String artistName = recommendation.getExtras()
            String artistName = recommendation.getExtras()