Disable gesture input detection when more keys keyboard is showing

Bug: 6852441
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index da41582..9b14210 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -671,7 +671,7 @@
         if (queue != null && queue.size() == 1) {
             mIsPossibleGesture = false;
             // A gesture should start only from the letter key.
-            if (sIsGestureEnabled && mIsAlphabetKeyboard && key != null
+            if (sIsGestureEnabled && mIsAlphabetKeyboard && !mIsShowingMoreKeysPanel && key != null
                     && Keyboard.isLetterCode(key.mCode)) {
                 mIsPossibleGesture = true;
                 // TODO: pointer times should be relative to first down even in entire batch input
@@ -915,8 +915,8 @@
     public void onShowMoreKeysPanel(int x, int y, KeyEventHandler handler) {
         abortBatchInput();
         onLongPressed();
-        onDownEvent(x, y, SystemClock.uptimeMillis(), handler);
         mIsShowingMoreKeysPanel = true;
+        onDownEvent(x, y, SystemClock.uptimeMillis(), handler);
     }
 
     public void onLongPressed() {