Change suggestion update delay from 100ms to 180ms to avoid flashy suggestion strip with quick multi-finger typing.
bug: 3122641 Change-Id: I385f9eb2e392487d7b4c252553d1f8d7c21da2e4main
parent
8493603be7
commit
fd0bd57deb
|
@ -137,6 +137,9 @@ public class LatinIME extends InputMethodService
|
||||||
private static final int MSG_VOICE_RESULTS = 3;
|
private static final int MSG_VOICE_RESULTS = 3;
|
||||||
private static final int MSG_UPDATE_OLD_SUGGESTIONS = 4;
|
private static final int MSG_UPDATE_OLD_SUGGESTIONS = 4;
|
||||||
|
|
||||||
|
private static final int DELAY_UPDATE_SUGGESTIONS = 180;
|
||||||
|
private static final int DELAY_UPDATE_OLD_SUGGESTIONS = 300;
|
||||||
|
|
||||||
// How many continuous deletes at which to start deleting at a higher speed.
|
// How many continuous deletes at which to start deleting at a higher speed.
|
||||||
private static final int DELETE_ACCELERATE_AT = 20;
|
private static final int DELETE_ACCELERATE_AT = 20;
|
||||||
// Key events coming any faster than this are long-presses.
|
// Key events coming any faster than this are long-presses.
|
||||||
|
@ -1581,12 +1584,14 @@ public class LatinIME extends InputMethodService
|
||||||
|
|
||||||
private void postUpdateSuggestions() {
|
private void postUpdateSuggestions() {
|
||||||
mHandler.removeMessages(MSG_UPDATE_SUGGESTIONS);
|
mHandler.removeMessages(MSG_UPDATE_SUGGESTIONS);
|
||||||
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_UPDATE_SUGGESTIONS), 100);
|
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_UPDATE_SUGGESTIONS),
|
||||||
|
DELAY_UPDATE_SUGGESTIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void postUpdateOldSuggestions() {
|
private void postUpdateOldSuggestions() {
|
||||||
mHandler.removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
|
mHandler.removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
|
||||||
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_UPDATE_OLD_SUGGESTIONS), 300);
|
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_UPDATE_OLD_SUGGESTIONS),
|
||||||
|
DELAY_UPDATE_OLD_SUGGESTIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPredictionOn() {
|
private boolean isPredictionOn() {
|
||||||
|
|
Loading…
Reference in New Issue