diff options
author | 2014-10-10 21:39:59 +0900 | |
---|---|---|
committer | 2014-10-14 20:19:15 +0900 | |
commit | b256bb57918409d09892557f5902955927946297 (patch) | |
tree | b21a9471919411c1630818cf52148a72407ca7e4 /java/src/com/android/inputmethod/latin/RichInputMethodManager.java | |
parent | 95f100ba404c3f905739db628ec71b7c1b7b5ace (diff) | |
download | latinime-b256bb57918409d09892557f5902955927946297.tar.gz latinime-b256bb57918409d09892557f5902955927946297.tar.xz latinime-b256bb57918409d09892557f5902955927946297.zip |
[ML24] Add facilities to read the script of a subtype
...or more exactly, the script of the keyboard layout set associated
with a given subtype.
Bug: 11230254
Change-Id: I82f5fc81ecffc561781816008c853be6ff9438dd
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputMethodManager.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputMethodManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java index 3fcae58f1..b0c0725bb 100644 --- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java +++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java @@ -20,6 +20,7 @@ import static com.android.inputmethod.latin.Constants.Subtype.KEYBOARD_MODE; import android.content.Context; import android.content.SharedPreferences; +import android.content.res.Resources; import android.os.Build; import android.os.IBinder; import android.preference.PreferenceManager; @@ -51,6 +52,7 @@ public class RichInputMethodManager { private static final RichInputMethodManager sInstance = new RichInputMethodManager(); + private Resources mResources; private InputMethodManagerCompatWrapper mImmWrapper; private InputMethodInfoCache mInputMethodInfoCache; final HashMap<InputMethodInfo, List<InputMethodSubtype>> @@ -84,6 +86,7 @@ public class RichInputMethodManager { return; } mImmWrapper = new InputMethodManagerCompatWrapper(context); + mResources = context.getResources(); mInputMethodInfoCache = new InputMethodInfoCache( mImmWrapper.mImm, context.getPackageName()); @@ -305,7 +308,8 @@ public class RichInputMethodManager { public RichInputMethodSubtype createCurrentRichInputMethodSubtype( final InputMethodSubtype rawSubtype) { - return AdditionalFeaturesSettingUtils.createRichInputMethodSubtype(this, rawSubtype); + return AdditionalFeaturesSettingUtils.createRichInputMethodSubtype(this, rawSubtype, + mResources); } public boolean hasMultipleEnabledIMEsOrSubtypes(final boolean shouldIncludeAuxiliarySubtypes) { |