Merge remote-tracking branch 'goog/master' into merge
This commit is contained in:
commit
5ba25ac180
2 changed files with 6 additions and 8 deletions
|
@ -141,7 +141,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
private int mKeyHintLabelSize;
|
private int mKeyHintLabelSize;
|
||||||
|
|
||||||
// Key preview
|
// Key preview
|
||||||
private boolean mInForeground;
|
|
||||||
private final TextView mPreviewText;
|
private final TextView mPreviewText;
|
||||||
private int mPreviewTextSize;
|
private int mPreviewTextSize;
|
||||||
private boolean mShowKeyPreviewPopup = true;
|
private boolean mShowKeyPreviewPopup = true;
|
||||||
|
@ -935,10 +934,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
canvas.translate(-x, -y);
|
canvas.translate(-x, -y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setForeground(boolean foreground) {
|
|
||||||
mInForeground = foreground;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: clean up this method.
|
// TODO: clean up this method.
|
||||||
private void dismissAllKeyPreviews() {
|
private void dismissAllKeyPreviews() {
|
||||||
for (PointerTracker tracker : mPointerTrackers) {
|
for (PointerTracker tracker : mPointerTrackers) {
|
||||||
|
@ -947,6 +942,10 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cancelAllMessage() {
|
||||||
|
mHandler.cancelAllMessages();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showKeyPreview(int keyIndex, PointerTracker tracker) {
|
public void showKeyPreview(int keyIndex, PointerTracker tracker) {
|
||||||
if (mShowKeyPreviewPopup) {
|
if (mShowKeyPreviewPopup) {
|
||||||
|
@ -991,7 +990,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
// If keyIndex is invalid or IME is already closed, we must not show key preview.
|
// 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
|
// Trying to show key preview while root window is closed causes
|
||||||
// WindowManager.BadTokenException.
|
// WindowManager.BadTokenException.
|
||||||
if (key == null || !mInForeground)
|
if (key == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mHandler.cancelAllDismissKeyPreviews();
|
mHandler.cancelAllDismissKeyPreviews();
|
||||||
|
|
|
@ -591,7 +591,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
inputView.setProximityCorrectionEnabled(true);
|
inputView.setProximityCorrectionEnabled(true);
|
||||||
// If we just entered a text field, maybe it has some old text that requires correction
|
// If we just entered a text field, maybe it has some old text that requires correction
|
||||||
mRecorrection.checkRecorrectionOnStart();
|
mRecorrection.checkRecorrectionOnStart();
|
||||||
inputView.setForeground(true);
|
|
||||||
|
|
||||||
voiceIme.onStartInputView(inputView.getWindowToken());
|
voiceIme.onStartInputView(inputView.getWindowToken());
|
||||||
|
|
||||||
|
@ -679,7 +678,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
public void onFinishInputView(boolean finishingInput) {
|
public void onFinishInputView(boolean finishingInput) {
|
||||||
super.onFinishInputView(finishingInput);
|
super.onFinishInputView(finishingInput);
|
||||||
KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
||||||
if (inputView != null) inputView.setForeground(false);
|
if (inputView != null) inputView.cancelAllMessage();
|
||||||
// Remove pending messages related to update suggestions
|
// Remove pending messages related to update suggestions
|
||||||
mHandler.cancelUpdateSuggestions();
|
mHandler.cancelUpdateSuggestions();
|
||||||
mHandler.cancelUpdateOldSuggestions();
|
mHandler.cancelUpdateOldSuggestions();
|
||||||
|
|
Loading…
Reference in a new issue