From 8ab46225b3e819fe31dd3bd487a7e9d1ff859ded Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 2 Oct 2014 12:24:35 +0900 Subject: [PATCH] Fix unnecessary touch event handling Bug: 17762449 Change-Id: I698ca91ab977aa65c7bd8a5fb82b3d91264cfbca --- .../inputmethod/latin/suggestions/SuggestionStripView.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index b421a7eb5..e40fd8800 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -400,6 +400,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick if (mStripVisibilityGroup.isShowingImportantNoticeStrip()) { return false; } + // Detecting sliding up finger to show {@link MoreSuggestionsView}. if (!mMoreSuggestionsView.isShowingInParent()) { mLastX = (int)me.getX(); mLastY = (int)me.getY(); @@ -439,6 +440,11 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick @Override public boolean onTouchEvent(final MotionEvent me) { + if (!mMoreSuggestionsView.isShowingInParent()) { + // Ignore any touch event while more suggestions panel hasn't been shown. + // Detecting sliding up is done at {@link #onInterceptTouchEvent}. + return true; + } // In the sliding input mode. {@link MotionEvent} should be forwarded to // {@link MoreSuggestionsView}. final int index = me.getActionIndex();