Call click event on IME quick select for SearchResultIcon

Bug: 171131394
Change-Id: I8a703e8d0ca10570e3f774510610d3fb4c0eaab8
This commit is contained in:
Samuel Fufa 2020-10-19 10:19:31 -07:00
parent 1f79eeda76
commit 71f24588c0
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -104,7 +104,6 @@ public class SearchResultPlayItem extends LinearLayout implements
iconParams.height = mDeviceProfile.allAppsIconSizePx;
iconParams.width = mDeviceProfile.allAppsIconSizePx;
setOnClickListener(view -> handleSelection(SearchTargetEvent.SELECT));
}