Change suggestion update delay from 100ms to 180ms to avoid flashy suggestion strip with quick multi-finger typing.

bug: 3122641
Change-Id: I385f9eb2e392487d7b4c252553d1f8d7c21da2e4
main
Ken Wakasa 2010-10-27 18:05:27 +09:00
parent 8493603be7
commit fd0bd57deb
1 changed files with 7 additions and 2 deletions

View File

@ -137,6 +137,9 @@ public class LatinIME extends InputMethodService
private static final int MSG_VOICE_RESULTS = 3;
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.
private static final int DELETE_ACCELERATE_AT = 20;
// Key events coming any faster than this are long-presses.
@ -1581,12 +1584,14 @@ public class LatinIME extends InputMethodService
private void postUpdateSuggestions() {
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() {
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() {