From 21f038ee0aadfeb2036c238d543b107d97729449 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 24 Sep 2014 12:25:23 +0900 Subject: [PATCH] Stop showing more suggestions while important notice is showing Bug: 15812659 Change-Id: I314e235cfffae3ae655320a9a75867efc28066bf --- .../latin/suggestions/SuggestionStripView.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 197a544d1..43f6175ca 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -131,6 +131,10 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick mImportantNoticeStrip.setVisibility(VISIBLE); } + public boolean isShowingImportantNoticeStrip() { + return mImportantNoticeStrip.getVisibility() == VISIBLE; + } + public boolean isShowingAddToDictionaryStrip() { return mAddToDictionaryStrip.getVisibility() == VISIBLE; } @@ -393,7 +397,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick @Override public boolean onInterceptTouchEvent(final MotionEvent me) { - if (mMoreSuggestionsView.isInModalMode()) { + if (mStripVisibilityGroup.isShowingImportantNoticeStrip()) { return false; } if (!mMoreSuggestionsView.isShowingInParent()) { @@ -401,6 +405,9 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick mLastY = (int)me.getY(); return mMoreSuggestionsSlidingDetector.onTouchEvent(me); } + if (mMoreSuggestionsView.isInModalMode()) { + return false; + } final int action = me.getAction(); final int index = me.getActionIndex();