am 7eade776: am 7aa47cb3: Only do double-space-period on real text fields.

* commit '7eade77656aa51ac575c1a1030ed0379574106d4':
  Only do double-space-period on real text fields.
This commit is contained in:
Jean Chalard 2014-09-12 19:17:42 +00:00 committed by Android Git Automerger
commit 38fd3a3056
2 changed files with 13 additions and 1 deletions

View file

@ -42,6 +42,7 @@ public final class InputAttributes {
final public boolean mApplicationSpecifiedCompletionOn;
final public boolean mShouldInsertSpacesAutomatically;
final public boolean mShouldShowVoiceInputKey;
final public boolean mIsGeneralTextInput;
final private int mInputType;
final private EditorInfo mEditorInfo;
final private String mPackageNameForPrivateImeOptions;
@ -76,6 +77,7 @@ public final class InputAttributes {
mApplicationSpecifiedCompletionOn = false;
mShouldInsertSpacesAutomatically = false;
mShouldShowVoiceInputKey = false;
mIsGeneralTextInput = false;
return;
}
// inputClass == InputType.TYPE_CLASS_TEXT
@ -117,6 +119,15 @@ public final class InputAttributes {
|| (!flagAutoCorrect && !flagMultiLine);
mApplicationSpecifiedCompletionOn = flagAutoComplete && isFullscreenMode;
// If we come here, inputClass is always TYPE_CLASS_TEXT
mIsGeneralTextInput = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS != variation
&& InputType.TYPE_TEXT_VARIATION_PASSWORD != variation
&& InputType.TYPE_TEXT_VARIATION_PHONETIC != variation
&& InputType.TYPE_TEXT_VARIATION_URI != variation
&& InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD != variation
&& InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS != variation
&& InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD != variation;
}
public boolean isTypeNull() {

View file

@ -148,7 +148,8 @@ public final class SettingsValues {
? Settings.readShowsLanguageSwitchKey(prefs) : true /* forcibly */;
mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, true);
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true);
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true)
&& inputAttributes.mIsGeneralTextInput;
mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res);
mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res);
mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);