Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38fd3a30 authored by Jean Chalard's avatar Jean Chalard Committed by Android Git Automerger
Browse files

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

* commit '7eade776':
  Only do double-space-period on real text fields.
parents a033e8fd 7eade776
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -42,6 +42,7 @@ public final class InputAttributes {
    final public boolean mApplicationSpecifiedCompletionOn;
    final public boolean mApplicationSpecifiedCompletionOn;
    final public boolean mShouldInsertSpacesAutomatically;
    final public boolean mShouldInsertSpacesAutomatically;
    final public boolean mShouldShowVoiceInputKey;
    final public boolean mShouldShowVoiceInputKey;
    final public boolean mIsGeneralTextInput;
    final private int mInputType;
    final private int mInputType;
    final private EditorInfo mEditorInfo;
    final private EditorInfo mEditorInfo;
    final private String mPackageNameForPrivateImeOptions;
    final private String mPackageNameForPrivateImeOptions;
@@ -76,6 +77,7 @@ public final class InputAttributes {
            mApplicationSpecifiedCompletionOn = false;
            mApplicationSpecifiedCompletionOn = false;
            mShouldInsertSpacesAutomatically = false;
            mShouldInsertSpacesAutomatically = false;
            mShouldShowVoiceInputKey = false;
            mShouldShowVoiceInputKey = false;
            mIsGeneralTextInput = false;
            return;
            return;
        }
        }
        // inputClass == InputType.TYPE_CLASS_TEXT
        // inputClass == InputType.TYPE_CLASS_TEXT
@@ -117,6 +119,15 @@ public final class InputAttributes {
                || (!flagAutoCorrect && !flagMultiLine);
                || (!flagAutoCorrect && !flagMultiLine);


        mApplicationSpecifiedCompletionOn = flagAutoComplete && isFullscreenMode;
        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() {
    public boolean isTypeNull() {
+2 −1
Original line number Original line Diff line number Diff line
@@ -148,7 +148,8 @@ public final class SettingsValues {
                ? Settings.readShowsLanguageSwitchKey(prefs) : true /* forcibly */;
                ? Settings.readShowsLanguageSwitchKey(prefs) : true /* forcibly */;
        mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
        mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
        mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, 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);
        mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res);
        mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res);
        mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res);
        mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);
        mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);