am 554346e9: [IL126] Move a setting value to SettingsValues
* commit '554346e94c852222a16b8ade732832158cbd34af': [IL126] Move a setting value to SettingsValuesmain
commit
36e6589b83
|
@ -169,7 +169,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private int mDelayUpdateSuggestions;
|
private int mDelayUpdateSuggestions;
|
||||||
private int mDelayUpdateShiftState;
|
private int mDelayUpdateShiftState;
|
||||||
private long mDoubleSpacePeriodTimeout;
|
|
||||||
private long mDoubleSpacePeriodTimerStart;
|
private long mDoubleSpacePeriodTimerStart;
|
||||||
|
|
||||||
public UIHandler(final LatinIME ownerInstance) {
|
public UIHandler(final LatinIME ownerInstance) {
|
||||||
|
@ -184,8 +183,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
final Resources res = latinIme.getResources();
|
final Resources res = latinIme.getResources();
|
||||||
mDelayUpdateSuggestions = res.getInteger(R.integer.config_delay_update_suggestions);
|
mDelayUpdateSuggestions = res.getInteger(R.integer.config_delay_update_suggestions);
|
||||||
mDelayUpdateShiftState = res.getInteger(R.integer.config_delay_update_shift_state);
|
mDelayUpdateShiftState = res.getInteger(R.integer.config_delay_update_shift_state);
|
||||||
mDoubleSpacePeriodTimeout =
|
|
||||||
res.getInteger(R.integer.config_double_space_period_timeout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -327,7 +324,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
public boolean isAcceptingDoubleSpacePeriod() {
|
public boolean isAcceptingDoubleSpacePeriod() {
|
||||||
return SystemClock.uptimeMillis() - mDoubleSpacePeriodTimerStart
|
return SystemClock.uptimeMillis() - mDoubleSpacePeriodTimerStart
|
||||||
< mDoubleSpacePeriodTimeout;
|
< getOwnerInstance().mSettings.getCurrent().mDoubleSpacePeriodTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Working variables for the following methods.
|
// Working variables for the following methods.
|
||||||
|
|
|
@ -50,6 +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 mDelayUpdateOldSuggestions;
|
||||||
|
public final long mDoubleSpacePeriodTimeout;
|
||||||
|
|
||||||
// From preferences, in the same order as xml/prefs.xml:
|
// From preferences, in the same order as xml/prefs.xml:
|
||||||
public final boolean mAutoCap;
|
public final boolean mAutoCap;
|
||||||
|
@ -132,6 +133,7 @@ public final class SettingsValues {
|
||||||
mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res);
|
mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res);
|
||||||
mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res);
|
mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res);
|
||||||
mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);
|
mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);
|
||||||
|
mDoubleSpacePeriodTimeout = res.getInteger(R.integer.config_double_space_period_timeout);
|
||||||
|
|
||||||
// Compute other readable settings
|
// Compute other readable settings
|
||||||
mKeyLongpressTimeout = Settings.readKeyLongpressTimeout(prefs, res);
|
mKeyLongpressTimeout = Settings.readKeyLongpressTimeout(prefs, res);
|
||||||
|
|
Loading…
Reference in New Issue