am 1ee7b645: Merge change I0743a389 into eclair-mr2

Merge commit '1ee7b6453aaae47a6493a97790b9483aca1556c9' into eclair-mr2-plus-aosp

* commit '1ee7b6453aaae47a6493a97790b9483aca1556c9':
  Close popup when Keyboard gets a CANCEL motion event.
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java
index 0f7ef22..76131fc 100755
--- a/core/java/android/inputmethodservice/KeyboardView.java
+++ b/core/java/android/inputmethodservice/KeyboardView.java
@@ -1127,7 +1127,7 @@
         
         // Needs to be called after the gesture detector gets a turn, as it may have
         // displayed the mini keyboard
-        if (mMiniKeyboardOnScreen) {
+        if (mMiniKeyboardOnScreen && action != MotionEvent.ACTION_CANCEL) {
             return true;
         }
 
@@ -1222,6 +1222,7 @@
                 break;
             case MotionEvent.ACTION_CANCEL:
                 removeMessages();
+                dismissPopupKeyboard();
                 mAbortKey = true;
                 showPreview(NOT_A_KEY);
                 invalidateKey(mCurrentKey);