Merge "Draw popup hint "..." by text rendering"
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 157c2b4..52e2a6a 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -142,7 +142,6 @@
private int mKeyHintLabelSize;
// Key preview
- private boolean mInForeground;
private final TextView mPreviewText;
private int mPreviewTextSize;
private boolean mShowKeyPreviewPopup = true;
@@ -931,10 +930,6 @@
canvas.translate(-x, -y);
}
- public void setForeground(boolean foreground) {
- mInForeground = foreground;
- }
-
// TODO: clean up this method.
private void dismissAllKeyPreviews() {
for (PointerTracker tracker : mPointerTrackers) {
@@ -943,6 +938,10 @@
}
}
+ public void cancelAllMessage() {
+ mHandler.cancelAllMessages();
+ }
+
@Override
public void showKeyPreview(int keyIndex, PointerTracker tracker) {
if (mShowKeyPreviewPopup) {
@@ -987,7 +986,7 @@
// If keyIndex is invalid or IME is already closed, we must not show key preview.
// Trying to show key preview while root window is closed causes
// WindowManager.BadTokenException.
- if (key == null || !mInForeground)
+ if (key == null)
return;
mHandler.cancelAllDismissKeyPreviews();
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 45f35ec..874d77f 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -591,7 +591,6 @@
inputView.setProximityCorrectionEnabled(true);
// If we just entered a text field, maybe it has some old text that requires correction
mRecorrection.checkRecorrectionOnStart();
- inputView.setForeground(true);
voiceIme.onStartInputView(inputView.getWindowToken());
@@ -679,7 +678,7 @@
public void onFinishInputView(boolean finishingInput) {
super.onFinishInputView(finishingInput);
KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
- if (inputView != null) inputView.setForeground(false);
+ if (inputView != null) inputView.cancelAllMessage();
// Remove pending messages related to update suggestions
mHandler.cancelUpdateSuggestions();
mHandler.cancelUpdateOldSuggestions();