diff options
author | 2014-08-25 04:42:15 +0000 | |
---|---|---|
committer | 2014-08-25 04:42:15 +0000 | |
commit | 85ddfe1317a4475269e53f62c2338c335e02e839 (patch) | |
tree | d87b69289b18a68d39a289e1e66ded06da583253 /java/src/com/android/inputmethod/latin/RichInputMethodManager.java | |
parent | a63d0a8ee6cb05bcddb69bf9a6018853d89d886a (diff) | |
download | latinime-85ddfe1317a4475269e53f62c2338c335e02e839.tar.gz latinime-85ddfe1317a4475269e53f62c2338c335e02e839.tar.xz latinime-85ddfe1317a4475269e53f62c2338c335e02e839.zip |
Revert "Revert "[ML1] Introduce RichInputMethodSubtype""
This reverts commit a63d0a8ee6cb05bcddb69bf9a6018853d89d886a.
This patch seems to be fine after all, but was submitted without its companion [ML1.1] patch causing a build breakage. Reverting the revert and submitting both at the same time seems like the right thing to do.
Change-Id: Ib8fefa40b74dcee0edb025a52dac9b35c82d49df
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputMethodManager.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputMethodManager.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java index 7cf4eff92..fc7a53a02 100644 --- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java +++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java @@ -297,10 +297,14 @@ public final class RichInputMethodManager { return INDEX_NOT_FOUND; } - public InputMethodSubtype getCurrentInputMethodSubtype( - final InputMethodSubtype defaultSubtype) { + public RichInputMethodSubtype getCurrentInputMethodSubtype( + final RichInputMethodSubtype defaultSubtype) { final InputMethodSubtype currentSubtype = mImmWrapper.mImm.getCurrentInputMethodSubtype(); - return (currentSubtype != null) ? currentSubtype : defaultSubtype; + if (currentSubtype == null) { + return defaultSubtype; + } + // TODO: Determine locales to use for multi-lingual use. + return new RichInputMethodSubtype(currentSubtype); } public boolean hasMultipleEnabledIMEsOrSubtypes(final boolean shouldIncludeAuxiliarySubtypes) { |