[ML20.1] Move getRichInputMethodSubtype to additional features

Bug: 11230254
Change-Id: I9bc19db5f101eeb6841394fe3637f271c93cbfa7
This commit is contained in:
Jean Chalard 2014-10-09 14:11:23 +09:00
parent 176e6e22cf
commit 437fcbaa9f
2 changed files with 14 additions and 2 deletions

View file

@ -19,6 +19,12 @@ package com.android.inputmethod.latin.settings;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceFragment;
import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.latin.RichInputMethodSubtype;
import com.android.inputmethod.latin.RichInputMethodManager;
import javax.annotation.Nonnull;
/**
* Utility class for managing additional features settings.
@ -39,4 +45,10 @@ public class AdditionalFeaturesSettingUtils {
final SharedPreferences prefs, final int[] additionalFeaturesPreferences) {
// do nothing.
}
public static RichInputMethodSubtype getRichInputMethodSubtype(
@Nonnull final RichInputMethodManager imm,
@Nonnull final InputMethodSubtype subtype) {
return new RichInputMethodSubtype(subtype);
}
}

View file

@ -29,6 +29,7 @@ import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
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.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
@ -304,8 +305,7 @@ public class RichInputMethodManager {
if (currentSubtype == null) {
return defaultSubtype;
}
// TODO: Determine locales to use for multi-lingual use.
return new RichInputMethodSubtype(currentSubtype);
return AdditionalFeaturesSettingUtils.getRichInputMethodSubtype(this, currentSubtype);
}
public boolean hasMultipleEnabledIMEsOrSubtypes(final boolean shouldIncludeAuxiliarySubtypes) {