Loading java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java +2 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.Settings; import com.android.inputmethod.latin.SharedPreferencesCompat; import com.android.inputmethod.latin.Utils; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; Loading Loading @@ -125,8 +126,7 @@ public class LanguageSwitcher { private void constructLocales() { mLocales.clear(); for (final String lang : mSelectedLanguageArray) { final Locale locale = new Locale(lang.substring(0, 2), lang.length() > 4 ? lang.substring(3, 5) : ""); final Locale locale = Utils.constructLocaleFromString(lang); mLocales.add(locale); } } Loading java/src/com/android/inputmethod/keyboard/LatinKeyboard.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public class LatinKeyboard extends Keyboard { // of the most common key width of this keyboard). private static final int SPACEBAR_DRAG_WIDTH = 3; // Minimum width of space key preview (proportional to keyboard width). private static final float SPACEBAR_POPUP_MIN_RATIO = 0.4f; private static final float SPACEBAR_POPUP_MIN_RATIO = 0.5f; // Height in space key the language name will be drawn. (proportional to space key height) public static final float SPACEBAR_LANGUAGE_BASELINE = 0.6f; // If the full language name needs to be smaller than this value to be drawn on space key, Loading java/src/com/android/inputmethod/keyboard/SlidingLocaleDrawable.java +2 −2 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ import android.view.ViewConfiguration; * movement on the spacebar. */ public class SlidingLocaleDrawable extends Drawable { private static final int SLIDE_SPEED_MULTIPLIER_RATIO = 150; private final Context mContext; private final Resources mRes; private final int mWidth; Loading Loading @@ -90,7 +90,7 @@ public class SlidingLocaleDrawable extends Drawable { mCurrentLanguage = null; return; } mDiff = diff; mDiff = Math.max(diff, diff * SLIDE_SPEED_MULTIPLIER_RATIO / 100); if (mDiff > mWidth) mDiff = mWidth; if (mDiff < -mWidth) mDiff = -mWidth; if (Math.abs(mDiff) > mThreshold) mHitThreshold = true; Loading java/src/com/android/inputmethod/latin/LatinIME.java +3 −3 Original line number Diff line number Diff line Loading @@ -406,7 +406,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private void initSuggest() { final String localeStr = mSubtypeSwitcher.getInputLocaleStr(); final Locale keyboardLocale = new Locale(localeStr); final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr); final Resources res = mResources; final Locale savedLocale = Utils.setSystemLocale(res, keyboardLocale); Loading Loading @@ -440,7 +440,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar /* package private */ void resetSuggestMainDict() { final String localeStr = mSubtypeSwitcher.getInputLocaleStr(); final Locale keyboardLocale = new Locale(localeStr); final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr); int mainDicResId = Utils.getMainDictionaryResourceId(mResources); mSuggest.resetMainDict(this, mainDicResId, keyboardLocale); } Loading Loading @@ -1553,7 +1553,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // a magic space even if it was a normal space. This is meant to help in case the user // pressed space on purpose of displaying the suggestion strip punctuation. final char primaryCode = suggestion.charAt(0); final CharSequence beforeText = ic.getTextBeforeCursor(1, 0); final CharSequence beforeText = ic != null ? ic.getTextBeforeCursor(1, 0) : ""; final int toLeft = (ic == null || TextUtils.isEmpty(beforeText)) ? 0 : beforeText.charAt(0); final boolean oldMagicSpace = mJustAddedMagicSpace; Loading java/src/com/android/inputmethod/latin/Settings.java +1 −4 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ public class Settings extends PreferenceActivity final Resources res = context.getResources(); final Locale savedLocale; if (null != localeStr) { final Locale keyboardLocale = new Locale(localeStr); final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr); savedLocale = Utils.setSystemLocale(res, keyboardLocale); } else { savedLocale = null; Loading Loading @@ -354,8 +354,6 @@ public class Settings extends PreferenceActivity (PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY); final PreferenceGroup textCorrectionGroup = (PreferenceGroup) findPreference(PREF_CORRECTION_SETTINGS_KEY); final PreferenceGroup bigramGroup = (PreferenceGroup) findPreference(PREF_NGRAM_SETTINGS_KEY); final boolean showSettingsKeyOption = res.getBoolean( R.bool.config_enable_show_settings_key_option); Loading Loading @@ -499,7 +497,6 @@ public class Settings extends PreferenceActivity } private void updateSettingsKeySummary() { final ListPreference lp = mSettingsKeyPreference; mSettingsKeyPreference.setSummary( getResources().getStringArray(R.array.settings_key_modes) [mSettingsKeyPreference.findIndexOfValue(mSettingsKeyPreference.getValue())]); Loading Loading
java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java +2 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.Settings; import com.android.inputmethod.latin.SharedPreferencesCompat; import com.android.inputmethod.latin.Utils; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; Loading Loading @@ -125,8 +126,7 @@ public class LanguageSwitcher { private void constructLocales() { mLocales.clear(); for (final String lang : mSelectedLanguageArray) { final Locale locale = new Locale(lang.substring(0, 2), lang.length() > 4 ? lang.substring(3, 5) : ""); final Locale locale = Utils.constructLocaleFromString(lang); mLocales.add(locale); } } Loading
java/src/com/android/inputmethod/keyboard/LatinKeyboard.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public class LatinKeyboard extends Keyboard { // of the most common key width of this keyboard). private static final int SPACEBAR_DRAG_WIDTH = 3; // Minimum width of space key preview (proportional to keyboard width). private static final float SPACEBAR_POPUP_MIN_RATIO = 0.4f; private static final float SPACEBAR_POPUP_MIN_RATIO = 0.5f; // Height in space key the language name will be drawn. (proportional to space key height) public static final float SPACEBAR_LANGUAGE_BASELINE = 0.6f; // If the full language name needs to be smaller than this value to be drawn on space key, Loading
java/src/com/android/inputmethod/keyboard/SlidingLocaleDrawable.java +2 −2 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ import android.view.ViewConfiguration; * movement on the spacebar. */ public class SlidingLocaleDrawable extends Drawable { private static final int SLIDE_SPEED_MULTIPLIER_RATIO = 150; private final Context mContext; private final Resources mRes; private final int mWidth; Loading Loading @@ -90,7 +90,7 @@ public class SlidingLocaleDrawable extends Drawable { mCurrentLanguage = null; return; } mDiff = diff; mDiff = Math.max(diff, diff * SLIDE_SPEED_MULTIPLIER_RATIO / 100); if (mDiff > mWidth) mDiff = mWidth; if (mDiff < -mWidth) mDiff = -mWidth; if (Math.abs(mDiff) > mThreshold) mHitThreshold = true; Loading
java/src/com/android/inputmethod/latin/LatinIME.java +3 −3 Original line number Diff line number Diff line Loading @@ -406,7 +406,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private void initSuggest() { final String localeStr = mSubtypeSwitcher.getInputLocaleStr(); final Locale keyboardLocale = new Locale(localeStr); final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr); final Resources res = mResources; final Locale savedLocale = Utils.setSystemLocale(res, keyboardLocale); Loading Loading @@ -440,7 +440,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar /* package private */ void resetSuggestMainDict() { final String localeStr = mSubtypeSwitcher.getInputLocaleStr(); final Locale keyboardLocale = new Locale(localeStr); final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr); int mainDicResId = Utils.getMainDictionaryResourceId(mResources); mSuggest.resetMainDict(this, mainDicResId, keyboardLocale); } Loading Loading @@ -1553,7 +1553,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // a magic space even if it was a normal space. This is meant to help in case the user // pressed space on purpose of displaying the suggestion strip punctuation. final char primaryCode = suggestion.charAt(0); final CharSequence beforeText = ic.getTextBeforeCursor(1, 0); final CharSequence beforeText = ic != null ? ic.getTextBeforeCursor(1, 0) : ""; final int toLeft = (ic == null || TextUtils.isEmpty(beforeText)) ? 0 : beforeText.charAt(0); final boolean oldMagicSpace = mJustAddedMagicSpace; Loading
java/src/com/android/inputmethod/latin/Settings.java +1 −4 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ public class Settings extends PreferenceActivity final Resources res = context.getResources(); final Locale savedLocale; if (null != localeStr) { final Locale keyboardLocale = new Locale(localeStr); final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr); savedLocale = Utils.setSystemLocale(res, keyboardLocale); } else { savedLocale = null; Loading Loading @@ -354,8 +354,6 @@ public class Settings extends PreferenceActivity (PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY); final PreferenceGroup textCorrectionGroup = (PreferenceGroup) findPreference(PREF_CORRECTION_SETTINGS_KEY); final PreferenceGroup bigramGroup = (PreferenceGroup) findPreference(PREF_NGRAM_SETTINGS_KEY); final boolean showSettingsKeyOption = res.getBoolean( R.bool.config_enable_show_settings_key_option); Loading Loading @@ -499,7 +497,6 @@ public class Settings extends PreferenceActivity } private void updateSettingsKeySummary() { final ListPreference lp = mSettingsKeyPreference; mSettingsKeyPreference.setSummary( getResources().getStringArray(R.array.settings_key_modes) [mSettingsKeyPreference.findIndexOfValue(mSettingsKeyPreference.getValue())]); Loading