diff options
author | 2015-02-23 19:11:14 +0000 | |
---|---|---|
committer | 2015-02-23 19:11:15 +0000 | |
commit | 53b4bfdba01477860993bff29eefc337e3fd1d99 (patch) | |
tree | fd5ddc1f29ffa373a266b87646df188166cf7352 | |
parent | 08f3cdb3c87e56ac62f5ac3c573beade592b4b06 (diff) | |
parent | 40833d2dd79b193efd33036417ad1909273d9f7d (diff) | |
download | latinime-53b4bfdba01477860993bff29eefc337e3fd1d99.tar.gz latinime-53b4bfdba01477860993bff29eefc337e3fd1d99.tar.xz latinime-53b4bfdba01477860993bff29eefc337e3fd1d99.zip |
Merge "Add StatsUtils method for handling subtype change."
-rw-r--r-- | java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java index 5a9258d51..011bc59f0 100644 --- a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java +++ b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java @@ -16,6 +16,8 @@ package com.android.inputmethod.latin.utils; +import android.view.inputmethod.InputMethodSubtype; + import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.settings.SettingsValues; @@ -86,4 +88,8 @@ public final class StatsUtils { public static void onInvalidWordIdentification(final String invalidWord) { } + + public static void onSubtypeChanged(final InputMethodSubtype oldSubtype, + final InputMethodSubtype newSubtype) { + } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index e37f20f09..550efa59f 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -793,6 +793,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public void onCurrentInputMethodSubtypeChanged(final InputMethodSubtype subtype) { // Note that the calling sequence of onCreate() and onCurrentInputMethodSubtypeChanged() // is not guaranteed. It may even be called at the same time on a different thread. + InputMethodSubtype oldSubtype = mRichImm.getCurrentSubtype().getRawSubtype(); + StatsUtils.onSubtypeChanged(oldSubtype, subtype); mRichImm.onSubtypeChanged(subtype); mInputLogic.onSubtypeChanged(SubtypeLocaleUtils.getCombiningRulesExtraValue(subtype), mSettings.getCurrent()); |