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

Commit cdad6424 authored by Cecilia Hong's avatar Cecilia Hong Committed by Automerger Merge Worker
Browse files

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

Merge "Bubbles up the long-press event from media rec item to the parent card." into sc-qpr1-dev am: 4f23ccd8

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

Change-Id: I48e5e75486d7c599213401a77ff2336fd225ffea
parents 03c5393e 4f23ccd8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -254,7 +254,8 @@ public class MediaControlPanel {
                openGuts();
                return true;
            } else {
                return false;
                closeGuts();
                return true;
            }
        });
        mRecommendationViewHolder.getCancel().setOnClickListener(v -> {
@@ -587,6 +588,14 @@ public class MediaControlPanel {
            ViewGroup mediaCoverContainer = mediaCoverContainers.get(uiComponentIndex);
            setSmartspaceRecItemOnClickListener(mediaCoverContainer, recommendation,
                    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.
            String artistName = recommendation.getExtras()