Merge "Use more descriptive names for some internal fields" into lmp-dev
commit
fdfe73ff1f
|
@ -24,7 +24,7 @@
|
||||||
at input history to suggest a hopefully helpful suggestions for the next word? -->
|
at input history to suggest a hopefully helpful suggestions for the next word? -->
|
||||||
<bool name="config_default_next_word_prediction">true</bool>
|
<bool name="config_default_next_word_prediction">true</bool>
|
||||||
|
|
||||||
<integer name="config_delay_update_shift_state">100</integer>
|
<integer name="config_delay_in_milliseconds_to_update_shift_state">100</integer>
|
||||||
<integer name="config_double_space_period_timeout">1100</integer>
|
<integer name="config_double_space_period_timeout">1100</integer>
|
||||||
|
|
||||||
<integer name="config_key_repeat_start_timeout">400</integer>
|
<integer name="config_key_repeat_start_timeout">400</integer>
|
||||||
|
@ -107,8 +107,8 @@
|
||||||
<!-- Common suggestion strip configuration. -->
|
<!-- Common suggestion strip configuration. -->
|
||||||
<integer name="config_suggestions_count_in_strip">3</integer>
|
<integer name="config_suggestions_count_in_strip">3</integer>
|
||||||
<fraction name="config_center_suggestion_percentile">36%</fraction>
|
<fraction name="config_center_suggestion_percentile">36%</fraction>
|
||||||
<integer name="config_delay_update_suggestions">100</integer>
|
<integer name="config_delay_in_milliseconds_to_update_suggestions">100</integer>
|
||||||
<integer name="config_delay_update_old_suggestions">300</integer>
|
<integer name="config_delay_in_milliseconds_to_update_old_suggestions">300</integer>
|
||||||
|
|
||||||
<!-- Common more suggestions configuraion. -->
|
<!-- Common more suggestions configuraion. -->
|
||||||
<dimen name="config_more_suggestions_key_horizontal_padding">12dp</dimen>
|
<dimen name="config_more_suggestions_key_horizontal_padding">12dp</dimen>
|
||||||
|
|
|
@ -193,8 +193,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
private static final int ARG1_FALSE = 0;
|
private static final int ARG1_FALSE = 0;
|
||||||
private static final int ARG1_TRUE = 1;
|
private static final int ARG1_TRUE = 1;
|
||||||
|
|
||||||
private int mDelayUpdateSuggestions;
|
private int mDelayInMillisecondsToUpdateSuggestions;
|
||||||
private int mDelayUpdateShiftState;
|
private int mDelayInMillisecondsToUpdateShiftState;
|
||||||
|
|
||||||
public UIHandler(final LatinIME ownerInstance) {
|
public UIHandler(final LatinIME ownerInstance) {
|
||||||
super(ownerInstance);
|
super(ownerInstance);
|
||||||
|
@ -206,8 +206,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Resources res = latinIme.getResources();
|
final Resources res = latinIme.getResources();
|
||||||
mDelayUpdateSuggestions = res.getInteger(R.integer.config_delay_update_suggestions);
|
mDelayInMillisecondsToUpdateSuggestions =
|
||||||
mDelayUpdateShiftState = res.getInteger(R.integer.config_delay_update_shift_state);
|
res.getInteger(R.integer.config_delay_in_milliseconds_to_update_suggestions);
|
||||||
|
mDelayInMillisecondsToUpdateShiftState =
|
||||||
|
res.getInteger(R.integer.config_delay_in_milliseconds_to_update_shift_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -273,7 +275,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
public void postUpdateSuggestionStrip(final int inputStyle) {
|
public void postUpdateSuggestionStrip(final int inputStyle) {
|
||||||
sendMessageDelayed(obtainMessage(MSG_UPDATE_SUGGESTION_STRIP, inputStyle,
|
sendMessageDelayed(obtainMessage(MSG_UPDATE_SUGGESTION_STRIP, inputStyle,
|
||||||
0 /* ignored */), mDelayUpdateSuggestions);
|
0 /* ignored */), mDelayInMillisecondsToUpdateSuggestions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postReopenDictionaries() {
|
public void postReopenDictionaries() {
|
||||||
|
@ -286,16 +288,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (latinIme == null) {
|
if (latinIme == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!latinIme.mSettings.getCurrent()
|
if (!latinIme.mSettings.getCurrent().isSuggestionsEnabledPerUserSettings()) {
|
||||||
.isSuggestionsEnabledPerUserSettings()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
removeMessages(MSG_RESUME_SUGGESTIONS);
|
removeMessages(MSG_RESUME_SUGGESTIONS);
|
||||||
if (shouldDelay) {
|
if (shouldDelay) {
|
||||||
sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS,
|
sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS,
|
||||||
shouldIncludeResumedWordInSuggestions ? ARG1_TRUE : ARG1_FALSE,
|
shouldIncludeResumedWordInSuggestions ? ARG1_TRUE : ARG1_FALSE,
|
||||||
0 /* ignored */),
|
0 /* ignored */), mDelayInMillisecondsToUpdateSuggestions);
|
||||||
mDelayUpdateSuggestions);
|
|
||||||
} else {
|
} else {
|
||||||
sendMessage(obtainMessage(MSG_RESUME_SUGGESTIONS,
|
sendMessage(obtainMessage(MSG_RESUME_SUGGESTIONS,
|
||||||
shouldIncludeResumedWordInSuggestions ? ARG1_TRUE : ARG1_FALSE,
|
shouldIncludeResumedWordInSuggestions ? ARG1_TRUE : ARG1_FALSE,
|
||||||
|
@ -336,7 +336,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
public void postUpdateShiftState() {
|
public void postUpdateShiftState() {
|
||||||
removeMessages(MSG_UPDATE_SHIFT_STATE);
|
removeMessages(MSG_UPDATE_SHIFT_STATE);
|
||||||
sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE), mDelayUpdateShiftState);
|
sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE),
|
||||||
|
mDelayInMillisecondsToUpdateShiftState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@UsedForTesting
|
@UsedForTesting
|
||||||
|
|
|
@ -50,7 +50,7 @@ public final class SettingsValues {
|
||||||
|
|
||||||
// From resources:
|
// From resources:
|
||||||
public final SpacingAndPunctuations mSpacingAndPunctuations;
|
public final SpacingAndPunctuations mSpacingAndPunctuations;
|
||||||
public final int mDelayUpdateOldSuggestions;
|
public final int mDelayInMillisecondsToUpdateOldSuggestions;
|
||||||
public final long mDoubleSpacePeriodTimeout;
|
public final long mDoubleSpacePeriodTimeout;
|
||||||
|
|
||||||
// From preferences, in the same order as xml/prefs.xml:
|
// From preferences, in the same order as xml/prefs.xml:
|
||||||
|
@ -106,7 +106,8 @@ public final class SettingsValues {
|
||||||
final InputAttributes inputAttributes) {
|
final InputAttributes inputAttributes) {
|
||||||
mLocale = res.getConfiguration().locale;
|
mLocale = res.getConfiguration().locale;
|
||||||
// Get the resources
|
// Get the resources
|
||||||
mDelayUpdateOldSuggestions = res.getInteger(R.integer.config_delay_update_old_suggestions);
|
mDelayInMillisecondsToUpdateOldSuggestions =
|
||||||
|
res.getInteger(R.integer.config_delay_in_milliseconds_to_update_old_suggestions);
|
||||||
mSpacingAndPunctuations = new SpacingAndPunctuations(res);
|
mSpacingAndPunctuations = new SpacingAndPunctuations(res);
|
||||||
|
|
||||||
// Store the input attributes
|
// Store the input attributes
|
||||||
|
@ -332,8 +333,8 @@ public final class SettingsValues {
|
||||||
final StringBuilder sb = new StringBuilder("Current settings :");
|
final StringBuilder sb = new StringBuilder("Current settings :");
|
||||||
sb.append("\n mSpacingAndPunctuations = ");
|
sb.append("\n mSpacingAndPunctuations = ");
|
||||||
sb.append("" + mSpacingAndPunctuations.dump());
|
sb.append("" + mSpacingAndPunctuations.dump());
|
||||||
sb.append("\n mDelayUpdateOldSuggestions = ");
|
sb.append("\n mDelayInMillisecondsToUpdateOldSuggestions = ");
|
||||||
sb.append("" + mDelayUpdateOldSuggestions);
|
sb.append("" + mDelayInMillisecondsToUpdateOldSuggestions);
|
||||||
sb.append("\n mAutoCap = ");
|
sb.append("\n mAutoCap = ");
|
||||||
sb.append("" + mAutoCap);
|
sb.append("" + mAutoCap);
|
||||||
sb.append("\n mVibrateOn = ");
|
sb.append("\n mVibrateOn = ");
|
||||||
|
|
Loading…
Reference in New Issue