Loading java/src/com/android/inputmethod/latin/InputAttributes.java +11 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ public final class InputAttributes { * {@link com.android.inputmethod.latin.settings.SettingsValues#mGestureFloatingPreviewTextEnabled} */ final public boolean mDisableGestureFloatingPreviewText; final public boolean mIsGeneralTextInput; final private int mInputType; final private EditorInfo mEditorInfo; final private String mPackageNameForPrivateImeOptions; Loading Loading @@ -84,6 +85,7 @@ public final class InputAttributes { mShouldInsertSpacesAutomatically = false; mShouldShowVoiceInputKey = false; mDisableGestureFloatingPreviewText = false; mIsGeneralTextInput = false; return; } // inputClass == InputType.TYPE_CLASS_TEXT Loading Loading @@ -128,6 +130,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() { Loading java/src/com/android/inputmethod/latin/settings/SettingsValues.java +2 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,8 @@ public 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); Loading Loading
java/src/com/android/inputmethod/latin/InputAttributes.java +11 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ public final class InputAttributes { * {@link com.android.inputmethod.latin.settings.SettingsValues#mGestureFloatingPreviewTextEnabled} */ final public boolean mDisableGestureFloatingPreviewText; final public boolean mIsGeneralTextInput; final private int mInputType; final private EditorInfo mEditorInfo; final private String mPackageNameForPrivateImeOptions; Loading Loading @@ -84,6 +85,7 @@ public final class InputAttributes { mShouldInsertSpacesAutomatically = false; mShouldShowVoiceInputKey = false; mDisableGestureFloatingPreviewText = false; mIsGeneralTextInput = false; return; } // inputClass == InputType.TYPE_CLASS_TEXT Loading Loading @@ -128,6 +130,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() { Loading
java/src/com/android/inputmethod/latin/settings/SettingsValues.java +2 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,8 @@ public 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); Loading