am 77e0fa1d: LatinIME portion of multi-lang option removal.
* commit '77e0fa1d6708fa53549d80fcd2035da5a30e4140': LatinIME portion of multi-lang option removal.main
commit
10155b5ef8
|
@ -27,8 +27,8 @@ public class NativeSuggestOptions {
|
||||||
|
|
||||||
private final int[] mOptions;
|
private final int[] mOptions;
|
||||||
|
|
||||||
public NativeSuggestOptions(final int additionalFeaturesSettingsSize) {
|
public NativeSuggestOptions() {
|
||||||
mOptions = new int[OPTIONS_SIZE + additionalFeaturesSettingsSize];
|
mOptions = new int[OPTIONS_SIZE];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsGesture(final boolean value) {
|
public void setIsGesture(final boolean value) {
|
||||||
|
@ -53,15 +53,6 @@ public class NativeSuggestOptions {
|
||||||
setIntegerOption(WEIGHT_FOR_LOCALE_IN_THOUSANDS, (int) (value * 1000));
|
setIntegerOption(WEIGHT_FOR_LOCALE_IN_THOUSANDS, (int) (value * 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAdditionalFeaturesOptions(final int[] additionalOptions) {
|
|
||||||
if (additionalOptions == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < additionalOptions.length; i++) {
|
|
||||||
setIntegerOption(OPTIONS_SIZE + i, additionalOptions[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int[] getOptions() {
|
public int[] getOptions() {
|
||||||
return mOptions;
|
return mOptions;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
android:fragment="com.android.inputmethod.latin.settings.AppearanceSettingsFragment"
|
android:fragment="com.android.inputmethod.latin.settings.AppearanceSettingsFragment"
|
||||||
android:title="@string/settings_screen_appearance"
|
android:title="@string/settings_screen_appearance"
|
||||||
android:key="screen_appearance" />
|
android:key="screen_appearance" />
|
||||||
<PreferenceScreen
|
|
||||||
android:fragment="com.android.inputmethod.latin.settings.MultiLingualSettingsFragment"
|
|
||||||
android:title="@string/settings_screen_multilingual"
|
|
||||||
android:key="screen_multilingual" />
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:fragment="com.android.inputmethod.latin.settings.GestureSettingsFragment"
|
android:fragment="com.android.inputmethod.latin.settings.GestureSettingsFragment"
|
||||||
android:title="@string/settings_screen_gesture"
|
android:title="@string/settings_screen_gesture"
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PreferenceScreen
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:title="@string/settings_screen_multilingual"
|
|
||||||
android:key="screen_multilingual">
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="pref_show_language_switch_key"
|
|
||||||
android:title="@string/show_language_switch_key"
|
|
||||||
android:summary="@string/show_language_switch_key_summary"
|
|
||||||
android:defaultValue="true"
|
|
||||||
android:persistent="true" />
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="pref_include_other_imes_in_language_switch_list"
|
|
||||||
android:dependency="pref_show_language_switch_key"
|
|
||||||
android:title="@string/include_other_imes_in_language_switch_list"
|
|
||||||
android:summary="@string/include_other_imes_in_language_switch_list_summary"
|
|
||||||
android:defaultValue="false"
|
|
||||||
android:persistent="true" />
|
|
||||||
</PreferenceScreen>
|
|
|
@ -293,8 +293,6 @@ public final class BinaryDictionary extends Dictionary {
|
||||||
settingsValuesForSuggestion.mBlockPotentiallyOffensive);
|
settingsValuesForSuggestion.mBlockPotentiallyOffensive);
|
||||||
session.mNativeSuggestOptions.setSpaceAwareGestureEnabled(
|
session.mNativeSuggestOptions.setSpaceAwareGestureEnabled(
|
||||||
settingsValuesForSuggestion.mSpaceAwareGestureEnabled);
|
settingsValuesForSuggestion.mSpaceAwareGestureEnabled);
|
||||||
session.mNativeSuggestOptions.setAdditionalFeaturesOptions(
|
|
||||||
settingsValuesForSuggestion.mAdditionalFeaturesSettingValues);
|
|
||||||
session.mNativeSuggestOptions.setWeightForLocale(weightForLocale);
|
session.mNativeSuggestOptions.setWeightForLocale(weightForLocale);
|
||||||
if (inOutWeightOfLangModelVsSpatialModel != null) {
|
if (inOutWeightOfLangModelVsSpatialModel != null) {
|
||||||
session.mInputOutputWeightOfLangModelVsSpatialModel[0] =
|
session.mInputOutputWeightOfLangModelVsSpatialModel[0] =
|
||||||
|
|
|
@ -18,7 +18,6 @@ package com.android.inputmethod.latin;
|
||||||
|
|
||||||
import com.android.inputmethod.latin.common.Constants;
|
import com.android.inputmethod.latin.common.Constants;
|
||||||
import com.android.inputmethod.latin.common.NativeSuggestOptions;
|
import com.android.inputmethod.latin.common.NativeSuggestOptions;
|
||||||
import com.android.inputmethod.latin.settings.AdditionalFeaturesSettingUtils;
|
|
||||||
import com.android.inputmethod.latin.utils.JniUtils;
|
import com.android.inputmethod.latin.utils.JniUtils;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
@ -44,8 +43,7 @@ public final class DicTraverseSession {
|
||||||
public final int[] mOutputAutoCommitFirstWordConfidence = new int[1];
|
public final int[] mOutputAutoCommitFirstWordConfidence = new int[1];
|
||||||
public final float[] mInputOutputWeightOfLangModelVsSpatialModel = new float[1];
|
public final float[] mInputOutputWeightOfLangModelVsSpatialModel = new float[1];
|
||||||
|
|
||||||
public final NativeSuggestOptions mNativeSuggestOptions = new NativeSuggestOptions(
|
public final NativeSuggestOptions mNativeSuggestOptions = new NativeSuggestOptions();
|
||||||
AdditionalFeaturesSettingUtils.ADDITIONAL_FEATURES_SETTINGS_SIZE);
|
|
||||||
|
|
||||||
private static native long setDicTraverseSessionNative(String locale, long dictSize);
|
private static native long setDicTraverseSessionNative(String locale, long dictSize);
|
||||||
private static native void initDicTraverseSessionNative(long nativeDicTraverseSession,
|
private static native void initDicTraverseSessionNative(long nativeDicTraverseSession,
|
||||||
|
|
|
@ -33,7 +33,6 @@ import android.view.inputmethod.InputMethodSubtype;
|
||||||
|
|
||||||
import com.android.inputmethod.annotations.UsedForTesting;
|
import com.android.inputmethod.annotations.UsedForTesting;
|
||||||
import com.android.inputmethod.compat.InputMethodManagerCompatWrapper;
|
import com.android.inputmethod.compat.InputMethodManagerCompatWrapper;
|
||||||
import com.android.inputmethod.latin.settings.AdditionalFeaturesSettingUtils;
|
|
||||||
import com.android.inputmethod.latin.settings.Settings;
|
import com.android.inputmethod.latin.settings.Settings;
|
||||||
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
|
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
|
||||||
import com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils;
|
import com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils;
|
||||||
|
@ -324,22 +323,6 @@ public class RichInputMethodManager {
|
||||||
return INDEX_NOT_FOUND;
|
return INDEX_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkIfSubtypeBelongsToThisIme(final InputMethodSubtype subtype) {
|
|
||||||
return getSubtypeIndexInIme(subtype, getInputMethodInfoOfThisIme()) != INDEX_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int getSubtypeIndexInIme(final InputMethodSubtype subtype,
|
|
||||||
final InputMethodInfo imi) {
|
|
||||||
final int count = imi.getSubtypeCount();
|
|
||||||
for (int index = 0; index < count; index++) {
|
|
||||||
final InputMethodSubtype ims = imi.getSubtypeAt(index);
|
|
||||||
if (ims.equals(subtype)) {
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return INDEX_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onSubtypeChanged(@Nonnull final InputMethodSubtype newSubtype) {
|
public void onSubtypeChanged(@Nonnull final InputMethodSubtype newSubtype) {
|
||||||
updateCurrentSubtype(newSubtype);
|
updateCurrentSubtype(newSubtype);
|
||||||
updateShortcutIme();
|
updateShortcutIme();
|
||||||
|
@ -416,7 +399,6 @@ public class RichInputMethodManager {
|
||||||
// subtypes should be counted as well.
|
// subtypes should be counted as well.
|
||||||
if (nonAuxCount > 0 || (shouldIncludeAuxiliarySubtypes && auxCount > 1)) {
|
if (nonAuxCount > 0 || (shouldIncludeAuxiliarySubtypes && auxCount > 1)) {
|
||||||
++filteredImisCount;
|
++filteredImisCount;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2204,8 +2204,7 @@ public final class InputLogic {
|
||||||
mWordComposer.isComposingWord() ? 2 : 1),
|
mWordComposer.isComposingWord() ? 2 : 1),
|
||||||
proximityInfo,
|
proximityInfo,
|
||||||
new SettingsValuesForSuggestion(settingsValues.mBlockPotentiallyOffensive,
|
new SettingsValuesForSuggestion(settingsValues.mBlockPotentiallyOffensive,
|
||||||
settingsValues.mPhraseGestureEnabled,
|
settingsValues.mPhraseGestureEnabled),
|
||||||
settingsValues.mAdditionalFeaturesSettingValues),
|
|
||||||
settingsValues.mAutoCorrectionEnabledPerUserSettings,
|
settingsValues.mAutoCorrectionEnabledPerUserSettings,
|
||||||
inputStyle, sequenceNumber, callback);
|
inputStyle, sequenceNumber, callback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,8 +103,6 @@ public final class AdvancedSettingsFragment extends SubScreenFragment {
|
||||||
removePreference(Settings.PREF_ENABLE_METRICS_LOGGING);
|
removePreference(Settings.PREF_ENABLE_METRICS_LOGGING);
|
||||||
}
|
}
|
||||||
|
|
||||||
AdditionalFeaturesSettingUtils.addAdditionalFeaturesPreferences(context, this);
|
|
||||||
|
|
||||||
setupKeypressVibrationDurationSettings();
|
setupKeypressVibrationDurationSettings();
|
||||||
setupKeypressSoundVolumeSettings();
|
setupKeypressSoundVolumeSettings();
|
||||||
setupKeyLongpressTimeoutSettings();
|
setupKeyLongpressTimeoutSettings();
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2014 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.android.inputmethod.latin.settings;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import com.android.inputmethod.latin.R;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "Multilingual options" settings sub screen.
|
|
||||||
*
|
|
||||||
* This settings sub screen handles the following input preferences.
|
|
||||||
* - Language switch key
|
|
||||||
* - Switch to other input methods
|
|
||||||
*/
|
|
||||||
public final class MultiLingualSettingsFragment extends SubScreenFragment {
|
|
||||||
@Override
|
|
||||||
public void onCreate(final Bundle icicle) {
|
|
||||||
super.onCreate(icicle);
|
|
||||||
addPreferencesFromResource(R.xml.prefs_screen_multilingual);
|
|
||||||
if (!Settings.ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS) {
|
|
||||||
removePreference(Settings.PREF_SHOW_LANGUAGE_SWITCH_KEY);
|
|
||||||
removePreference(Settings.PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST);
|
|
||||||
}
|
|
||||||
AdditionalFeaturesSettingUtils.addAdditionalFeaturesPreferences(getActivity(), this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -44,14 +44,8 @@ import javax.annotation.Nonnull;
|
||||||
public final class Settings implements SharedPreferences.OnSharedPreferenceChangeListener {
|
public final class Settings implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private static final String TAG = Settings.class.getSimpleName();
|
private static final String TAG = Settings.class.getSimpleName();
|
||||||
// Settings screens
|
// Settings screens
|
||||||
public static final String SCREEN_PREFERENCES = "screen_preferences";
|
|
||||||
public static final String SCREEN_ACCOUNTS = "screen_accounts";
|
public static final String SCREEN_ACCOUNTS = "screen_accounts";
|
||||||
public static final String SCREEN_APPEARANCE = "screen_appearance";
|
|
||||||
public static final String SCREEN_THEME = "screen_theme";
|
public static final String SCREEN_THEME = "screen_theme";
|
||||||
public static final String SCREEN_MULTILINGUAL = "screen_multilingual";
|
|
||||||
public static final String SCREEN_GESTURE = "screen_gesture";
|
|
||||||
public static final String SCREEN_CORRECTION = "screen_correction";
|
|
||||||
public static final String SCREEN_ADVANCED = "screen_advanced";
|
|
||||||
public static final String SCREEN_DEBUG = "screen_debug";
|
public static final String SCREEN_DEBUG = "screen_debug";
|
||||||
// In the same order as xml/prefs.xml
|
// In the same order as xml/prefs.xml
|
||||||
public static final String PREF_AUTO_CAP = "auto_cap";
|
public static final String PREF_AUTO_CAP = "auto_cap";
|
||||||
|
@ -73,9 +67,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
||||||
"pref_key_use_double_space_period";
|
"pref_key_use_double_space_period";
|
||||||
public static final String PREF_BLOCK_POTENTIALLY_OFFENSIVE =
|
public static final String PREF_BLOCK_POTENTIALLY_OFFENSIVE =
|
||||||
"pref_key_block_potentially_offensive";
|
"pref_key_block_potentially_offensive";
|
||||||
// No multilingual options in Android L and above for now.
|
|
||||||
public static final boolean SHOW_MULTILINGUAL_SETTINGS =
|
|
||||||
BuildCompatUtils.EFFECTIVE_SDK_INT <= Build.VERSION_CODES.KITKAT;
|
|
||||||
public static final boolean ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS =
|
public static final boolean ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS =
|
||||||
BuildCompatUtils.EFFECTIVE_SDK_INT <= Build.VERSION_CODES.KITKAT;
|
BuildCompatUtils.EFFECTIVE_SDK_INT <= Build.VERSION_CODES.KITKAT;
|
||||||
public static final boolean SHOULD_SHOW_LXX_SUGGESTION_UI =
|
public static final boolean SHOULD_SHOW_LXX_SUGGESTION_UI =
|
||||||
|
@ -84,7 +75,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
||||||
"pref_show_language_switch_key";
|
"pref_show_language_switch_key";
|
||||||
public static final String PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST =
|
public static final String PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST =
|
||||||
"pref_include_other_imes_in_language_switch_list";
|
"pref_include_other_imes_in_language_switch_list";
|
||||||
public static final String PREF_KEYBOARD_THEME = "pref_keyboard_theme";
|
|
||||||
public static final String PREF_CUSTOM_INPUT_STYLES = "custom_input_styles";
|
public static final String PREF_CUSTOM_INPUT_STYLES = "custom_input_styles";
|
||||||
public static final String PREF_ENABLE_SPLIT_KEYBOARD = "pref_split_keyboard";
|
public static final String PREF_ENABLE_SPLIT_KEYBOARD = "pref_split_keyboard";
|
||||||
// TODO: consolidate key preview dismiss delay with the key preview animation parameters.
|
// TODO: consolidate key preview dismiss delay with the key preview animation parameters.
|
||||||
|
@ -103,8 +93,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
||||||
"pref_gesture_floating_preview_text";
|
"pref_gesture_floating_preview_text";
|
||||||
public static final String PREF_PHRASE_GESTURE_ENABLED = "pref_gesture_space_aware";
|
public static final String PREF_PHRASE_GESTURE_ENABLED = "pref_gesture_space_aware";
|
||||||
|
|
||||||
public static final String PREF_INPUT_LANGUAGE = "input_language";
|
|
||||||
public static final String PREF_SELECTED_LANGUAGES = "selected_languages";
|
|
||||||
public static final String PREF_KEY_IS_INTERNAL = "pref_key_is_internal";
|
public static final String PREF_KEY_IS_INTERNAL = "pref_key_is_internal";
|
||||||
|
|
||||||
public static final String PREF_ENABLE_METRICS_LOGGING = "pref_enable_metrics_logging";
|
public static final String PREF_ENABLE_METRICS_LOGGING = "pref_enable_metrics_logging";
|
||||||
|
@ -203,14 +191,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
||||||
return mSettingsValues.mIsInternal;
|
return mSettingsValues.mIsInternal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWordSeparator(final int code) {
|
|
||||||
return mSettingsValues.isWordSeparator(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getBlockPotentiallyOffensive() {
|
|
||||||
return mSettingsValues.mBlockPotentiallyOffensive;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int readScreenMetrics(final Resources res) {
|
public static int readScreenMetrics(final Resources res) {
|
||||||
return res.getInteger(R.integer.config_screen_metrics);
|
return res.getInteger(R.integer.config_screen_metrics);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,15 +48,10 @@ public final class SettingsFragment extends InputMethodSettingsFragment {
|
||||||
final PreferenceScreen preferenceScreen = getPreferenceScreen();
|
final PreferenceScreen preferenceScreen = getPreferenceScreen();
|
||||||
preferenceScreen.setTitle(
|
preferenceScreen.setTitle(
|
||||||
ApplicationUtils.getActivityTitleResId(getActivity(), SettingsActivity.class));
|
ApplicationUtils.getActivityTitleResId(getActivity(), SettingsActivity.class));
|
||||||
if (!Settings.SHOW_MULTILINGUAL_SETTINGS) {
|
|
||||||
final Preference multilingualOptions = findPreference(Settings.SCREEN_MULTILINGUAL);
|
|
||||||
preferenceScreen.removePreference(multilingualOptions);
|
|
||||||
}
|
|
||||||
if (!ProductionFlags.ENABLE_ACCOUNT_SIGN_IN) {
|
if (!ProductionFlags.ENABLE_ACCOUNT_SIGN_IN) {
|
||||||
final Preference accountsPreference = findPreference(Settings.SCREEN_ACCOUNTS);
|
final Preference accountsPreference = findPreference(Settings.SCREEN_ACCOUNTS);
|
||||||
preferenceScreen.removePreference(accountsPreference);
|
preferenceScreen.removePreference(accountsPreference);
|
||||||
}
|
}
|
||||||
AdditionalFeaturesSettingUtils.addAdditionalFeaturesPreferences(getActivity(), this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -102,10 +102,6 @@ public class SettingsValues {
|
||||||
private final boolean mSuggestionsEnabledPerUserSettings;
|
private final boolean mSuggestionsEnabledPerUserSettings;
|
||||||
private final AsyncResultHolder<AppWorkaroundsUtils> mAppWorkarounds;
|
private final AsyncResultHolder<AppWorkaroundsUtils> mAppWorkarounds;
|
||||||
|
|
||||||
// Setting values for additional features
|
|
||||||
public final int[] mAdditionalFeaturesSettingValues =
|
|
||||||
new int[AdditionalFeaturesSettingUtils.ADDITIONAL_FEATURES_SETTINGS_SIZE];
|
|
||||||
|
|
||||||
// TextDecorator
|
// TextDecorator
|
||||||
public final int mTextHighlightColorForAddToDictionaryIndicator;
|
public final int mTextHighlightColorForAddToDictionaryIndicator;
|
||||||
|
|
||||||
|
@ -187,8 +183,6 @@ public class SettingsValues {
|
||||||
mAutoCorrectionEnabledPerUserSettings = mAutoCorrectEnabled
|
mAutoCorrectionEnabledPerUserSettings = mAutoCorrectEnabled
|
||||||
&& !mInputAttributes.mInputTypeNoAutoCorrect;
|
&& !mInputAttributes.mInputTypeNoAutoCorrect;
|
||||||
mSuggestionsEnabledPerUserSettings = readSuggestionsEnabled(prefs);
|
mSuggestionsEnabledPerUserSettings = readSuggestionsEnabled(prefs);
|
||||||
AdditionalFeaturesSettingUtils.readAdditionalFeaturesPreferencesIntoArray(context,
|
|
||||||
prefs, mAdditionalFeaturesSettingValues);
|
|
||||||
mTextHighlightColorForAddToDictionaryIndicator = res.getColor(
|
mTextHighlightColorForAddToDictionaryIndicator = res.getColor(
|
||||||
R.color.text_decorator_add_to_dictionary_indicator_text_highlight_color);
|
R.color.text_decorator_add_to_dictionary_indicator_text_highlight_color);
|
||||||
mIsInternal = Settings.isInternal(prefs);
|
mIsInternal = Settings.isInternal(prefs);
|
||||||
|
@ -437,8 +431,6 @@ public class SettingsValues {
|
||||||
sb.append("\n mAppWorkarounds = ");
|
sb.append("\n mAppWorkarounds = ");
|
||||||
final AppWorkaroundsUtils awu = mAppWorkarounds.get(null, 0);
|
final AppWorkaroundsUtils awu = mAppWorkarounds.get(null, 0);
|
||||||
sb.append("" + (null == awu ? "null" : awu.toString()));
|
sb.append("" + (null == awu ? "null" : awu.toString()));
|
||||||
sb.append("\n mAdditionalFeaturesSettingValues = ");
|
|
||||||
sb.append("" + Arrays.toString(mAdditionalFeaturesSettingValues));
|
|
||||||
sb.append("\n mTextHighlightColorForAddToDictionaryIndicator = ");
|
sb.append("\n mTextHighlightColorForAddToDictionaryIndicator = ");
|
||||||
sb.append("" + mTextHighlightColorForAddToDictionaryIndicator);
|
sb.append("" + mTextHighlightColorForAddToDictionaryIndicator);
|
||||||
sb.append("\n mIsInternal = ");
|
sb.append("\n mIsInternal = ");
|
||||||
|
|
|
@ -19,12 +19,10 @@ package com.android.inputmethod.latin.settings;
|
||||||
public class SettingsValuesForSuggestion {
|
public class SettingsValuesForSuggestion {
|
||||||
public final boolean mBlockPotentiallyOffensive;
|
public final boolean mBlockPotentiallyOffensive;
|
||||||
public final boolean mSpaceAwareGestureEnabled;
|
public final boolean mSpaceAwareGestureEnabled;
|
||||||
public final int[] mAdditionalFeaturesSettingValues;
|
|
||||||
|
|
||||||
public SettingsValuesForSuggestion(final boolean blockPotentiallyOffensive,
|
public SettingsValuesForSuggestion(final boolean blockPotentiallyOffensive,
|
||||||
final boolean spaceAwareGestureEnabled, final int[] additionalFeaturesSettingValues) {
|
final boolean spaceAwareGestureEnabled) {
|
||||||
mBlockPotentiallyOffensive = blockPotentiallyOffensive;
|
mBlockPotentiallyOffensive = blockPotentiallyOffensive;
|
||||||
mSpaceAwareGestureEnabled = spaceAwareGestureEnabled;
|
mSpaceAwareGestureEnabled = spaceAwareGestureEnabled;
|
||||||
mAdditionalFeaturesSettingValues = additionalFeaturesSettingValues;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
||||||
// TODO: make a spell checker option to block offensive words or not
|
// TODO: make a spell checker option to block offensive words or not
|
||||||
private final SettingsValuesForSuggestion mSettingsValuesForSuggestion =
|
private final SettingsValuesForSuggestion mSettingsValuesForSuggestion =
|
||||||
new SettingsValuesForSuggestion(true /* blockPotentiallyOffensive */,
|
new SettingsValuesForSuggestion(true /* blockPotentiallyOffensive */,
|
||||||
true /* spaceAwareGestureEnabled */,
|
true /* spaceAwareGestureEnabled */);
|
||||||
null /* additionalFeaturesSettingValues */);
|
|
||||||
|
|
||||||
public static final String SINGLE_QUOTE = "\u0027";
|
public static final String SINGLE_QUOTE = "\u0027";
|
||||||
public static final String APOSTROPHE = "\u2019";
|
public static final String APOSTROPHE = "\u2019";
|
||||||
|
|
|
@ -238,8 +238,7 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
|
||||||
}
|
}
|
||||||
final SettingsValuesForSuggestion settingsValuesForSuggestion =
|
final SettingsValuesForSuggestion settingsValuesForSuggestion =
|
||||||
new SettingsValuesForSuggestion(false /* blockPotentiallyOffensive */,
|
new SettingsValuesForSuggestion(false /* blockPotentiallyOffensive */,
|
||||||
false /* spaceAwareGestureEnabled */,
|
false /* spaceAwareGestureEnabled */);
|
||||||
null /* additionalFeaturesSettingValues */);
|
|
||||||
final int trailingSingleQuotesCount = StringUtils.getTrailingSingleQuotesCount(testedWord);
|
final int trailingSingleQuotesCount = StringUtils.getTrailingSingleQuotesCount(testedWord);
|
||||||
final String consideredWord = trailingSingleQuotesCount > 0 ?
|
final String consideredWord = trailingSingleQuotesCount > 0 ?
|
||||||
testedWord.substring(0, testedWord.length() - trailingSingleQuotesCount) :
|
testedWord.substring(0, testedWord.length() - trailingSingleQuotesCount) :
|
||||||
|
|
|
@ -25,7 +25,6 @@ import com.android.inputmethod.latin.settings.CorrectionSettingsFragment;
|
||||||
import com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment;
|
import com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment;
|
||||||
import com.android.inputmethod.latin.settings.DebugSettingsFragment;
|
import com.android.inputmethod.latin.settings.DebugSettingsFragment;
|
||||||
import com.android.inputmethod.latin.settings.GestureSettingsFragment;
|
import com.android.inputmethod.latin.settings.GestureSettingsFragment;
|
||||||
import com.android.inputmethod.latin.settings.MultiLingualSettingsFragment;
|
|
||||||
import com.android.inputmethod.latin.settings.PreferencesSettingsFragment;
|
import com.android.inputmethod.latin.settings.PreferencesSettingsFragment;
|
||||||
import com.android.inputmethod.latin.settings.SettingsFragment;
|
import com.android.inputmethod.latin.settings.SettingsFragment;
|
||||||
import com.android.inputmethod.latin.settings.ThemeSettingsFragment;
|
import com.android.inputmethod.latin.settings.ThemeSettingsFragment;
|
||||||
|
@ -46,7 +45,6 @@ public class FragmentUtils {
|
||||||
sLatinImeFragments.add(AccountsSettingsFragment.class.getName());
|
sLatinImeFragments.add(AccountsSettingsFragment.class.getName());
|
||||||
sLatinImeFragments.add(AppearanceSettingsFragment.class.getName());
|
sLatinImeFragments.add(AppearanceSettingsFragment.class.getName());
|
||||||
sLatinImeFragments.add(ThemeSettingsFragment.class.getName());
|
sLatinImeFragments.add(ThemeSettingsFragment.class.getName());
|
||||||
sLatinImeFragments.add(MultiLingualSettingsFragment.class.getName());
|
|
||||||
sLatinImeFragments.add(CustomInputStyleSettingsFragment.class.getName());
|
sLatinImeFragments.add(CustomInputStyleSettingsFragment.class.getName());
|
||||||
sLatinImeFragments.add(GestureSettingsFragment.class.getName());
|
sLatinImeFragments.add(GestureSettingsFragment.class.getName());
|
||||||
sLatinImeFragments.add(CorrectionSettingsFragment.class.getName());
|
sLatinImeFragments.add(CorrectionSettingsFragment.class.getName());
|
||||||
|
|
Loading…
Reference in New Issue