From 71f24588c0a66449a0c68bcb360a8c671914ce75 Mon Sep 17 00:00:00 2001 From: Samuel Fufa Date: Mon, 19 Oct 2020 10:19:31 -0700 Subject: [PATCH] Call click event on IME quick select for SearchResultIcon Bug: 171131394 Change-Id: I8a703e8d0ca10570e3f774510610d3fb4c0eaab8 --- src/com/android/launcher3/views/SearchResultIcon.java | 5 +++-- src/com/android/launcher3/views/SearchResultPlayItem.java | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/views/SearchResultIcon.java b/src/com/android/launcher3/views/SearchResultIcon.java index 51214aec0b..f4a8a72128 100644 --- a/src/com/android/launcher3/views/SearchResultIcon.java +++ b/src/com/android/launcher3/views/SearchResultIcon.java @@ -80,6 +80,7 @@ public class SearchResultIcon extends BubbleTextView implements @Override public void handleSelection(int eventType) { + mLauncher.getItemOnClickListener().onClick(this); SearchEventTracker.INSTANCE.get(mLauncher).notifySearchTargetEvent( new SearchTargetEvent.Builder(mSearchTarget, eventType).build()); } @@ -87,12 +88,12 @@ public class SearchResultIcon extends BubbleTextView implements @Override public void onClick(View view) { handleSelection(SearchTargetEvent.SELECT); - mLauncher.getItemOnClickListener().onClick(view); } @Override public boolean onLongClick(View view) { - handleSelection(SearchTargetEvent.LONG_PRESS); + SearchEventTracker.INSTANCE.get(mLauncher).notifySearchTargetEvent( + new SearchTargetEvent.Builder(mSearchTarget, SearchTargetEvent.LONG_PRESS).build()); return ItemLongClickListener.INSTANCE_ALL_APPS.onLongClick(view); } } diff --git a/src/com/android/launcher3/views/SearchResultPlayItem.java b/src/com/android/launcher3/views/SearchResultPlayItem.java index 6d85955f91..86ed436f53 100644 --- a/src/com/android/launcher3/views/SearchResultPlayItem.java +++ b/src/com/android/launcher3/views/SearchResultPlayItem.java @@ -104,7 +104,6 @@ public class SearchResultPlayItem extends LinearLayout implements iconParams.height = mDeviceProfile.allAppsIconSizePx; iconParams.width = mDeviceProfile.allAppsIconSizePx; setOnClickListener(view -> handleSelection(SearchTargetEvent.SELECT)); - }