am 437fcbaa
: [ML20.1] Move getRichInputMethodSubtype to additional features
* commit '437fcbaa9f9e7de6ccdb6c9ac5f977c0aa6e6bc6': [ML20.1] Move getRichInputMethodSubtype to additional features
This commit is contained in:
commit
4099611d64
2 changed files with 14 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue