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