diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index f235199d12..1dc10fea1f 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -132,7 +132,7 @@ public class AlphabeticalAppsList implements AllAppsStore.OnUpdateListener { * Returns the child adapter item with IME launch focus. */ public AdapterItem getFocusedChild() { - if (mAdapterItems.size() == 0 || getFocusedChildIndex() != -1) { + if (mAdapterItems.size() == 0 || getFocusedChildIndex() == -1) { return null; } return mAdapterItems.get(getFocusedChildIndex()); diff --git a/src/com/android/launcher3/views/SearchResultWidget.java b/src/com/android/launcher3/views/SearchResultWidget.java index 7d539553f0..f76de3d2cf 100644 --- a/src/com/android/launcher3/views/SearchResultWidget.java +++ b/src/com/android/launcher3/views/SearchResultWidget.java @@ -150,12 +150,14 @@ public class SearchResultWidget extends RelativeLayout implements public boolean onInterceptTouchEvent(MotionEvent ev) { mLongPressHelper.onTouchEvent(ev); mClickDetector.onTouchEvent(ev); - if (ev.getAction() == MotionEvent.ACTION_UP && !mLongPressHelper.hasPerformedLongPress()) { - handleSelection(SearchTargetEvent.CHILD_SELECT); - } - return super.onInterceptTouchEvent(ev); + return mLongPressHelper.hasPerformedLongPress(); } + @Override + public boolean onTouchEvent(MotionEvent ev) { + mLongPressHelper.onTouchEvent(ev); + return true; + } @Override public void cancelLongPress() {