diff --git a/java/src/com/android/inputmethod/latin/InputView.java b/java/src/com/android/inputmethod/latin/InputView.java
index 1cf17c8..81ccf83 100644
--- a/java/src/com/android/inputmethod/latin/InputView.java
+++ b/java/src/com/android/inputmethod/latin/InputView.java
@@ -33,11 +33,11 @@
     private final Rect mEventForwardingRect = new Rect();
     private final Rect mEventReceivingRect = new Rect();
 
-    public InputView(Context context, AttributeSet attrs) {
+    public InputView(final Context context, final AttributeSet attrs) {
         super(context, attrs, 0);
     }
 
-    public void setKeyboardGeometry(int keyboardTopPadding) {
+    public void setKeyboardGeometry(final int keyboardTopPadding) {
         mKeyboardTopPadding = keyboardTopPadding;
     }
 
@@ -48,18 +48,14 @@
     }
 
     @Override
-    public boolean dispatchTouchEvent(MotionEvent me) {
-        if (mSuggestionStripView.getVisibility() == VISIBLE
-                && mKeyboardView.getVisibility() == VISIBLE
-                && forwardTouchEvent(me)) {
-            return true;
+    public boolean dispatchTouchEvent(final MotionEvent me) {
+        if (mSuggestionStripView.getVisibility() != VISIBLE
+                || mKeyboardView.getVisibility() != VISIBLE) {
+            return super.dispatchTouchEvent(me);
         }
-        return super.dispatchTouchEvent(me);
-    }
 
-    // The touch events that hit the top padding of keyboard should be forwarded to
-    // {@link SuggestionStripView}.
-    private boolean forwardTouchEvent(MotionEvent me) {
+        // The touch events that hit the top padding of keyboard should be forwarded to
+        // {@link SuggestionStripView}.
         final Rect rect = mInputViewRect;
         this.getGlobalVisibleRect(rect);
         final int x = (int)me.getX() + rect.left;
@@ -68,7 +64,7 @@
         final Rect forwardingRect = mEventForwardingRect;
         mKeyboardView.getGlobalVisibleRect(forwardingRect);
         if (!mIsForwardingEvent && !forwardingRect.contains(x, y)) {
-            return false;
+            return super.dispatchTouchEvent(me);
         }
 
         final int forwardingLimitY = forwardingRect.top + mKeyboardTopPadding;
@@ -93,7 +89,7 @@
         }
 
         if (!sendToTarget) {
-            return false;
+            return super.dispatchTouchEvent(me);
         }
 
         final Rect receivingRect = mEventReceivingRect;
