aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-08-26 21:32:25 -0700
committerYohei Yukawa <yukawa@google.com>2014-08-27 01:30:45 -0700
commit29200b0abe1d65aa2f9ddefd247ab91563d666f8 (patch)
tree1d320bc3795fb4e793e2a006456769c395553fc0 /java/src/com/android/inputmethod/latin/LatinIME.java
parenta475c85480b2bc2a8d036b4b1ea29f6a8e749ac5 (diff)
downloadlatinime-29200b0abe1d65aa2f9ddefd247ab91563d666f8.tar.gz
latinime-29200b0abe1d65aa2f9ddefd247ab91563d666f8.tar.xz
latinime-29200b0abe1d65aa2f9ddefd247ab91563d666f8.zip
Set the text bgcolor only when CursorAnchorInfo is available
When CursorAnchorInfo is unavailable, we shouldn't try to show the commit indicator and set the text highlight color. With this CL, RichInputConnection can be used to track if the application responded that it does support CursorAnchorInfo or not. This result will be taken into consideration when InputLogic needs to determine whether the commit indicator should be displayed or not. Change-Id: I945d70eeb02a7a5f3d9b22459b23d7028508910f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dcafd83a5..2a7a5413d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -57,7 +57,6 @@ import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.accessibility.AccessibilityUtils;
import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.compat.CursorAnchorInfoCompatWrapper;
-import com.android.inputmethod.compat.InputConnectionCompatUtils;
import com.android.inputmethod.compat.InputMethodServiceCompatUtils;
import com.android.inputmethod.dictionarypack.DictionaryPackConstants;
import com.android.inputmethod.event.Event;
@@ -777,20 +776,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// 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.
mSubtypeSwitcher.onSubtypeChanged(subtype);
- mInputLogic.onSubtypeChanged(SubtypeLocaleUtils.getCombiningRulesExtraValue(subtype));
+ mInputLogic.onSubtypeChanged(SubtypeLocaleUtils.getCombiningRulesExtraValue(subtype),
+ mSettings.getCurrent());
loadKeyboard();
}
private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
super.onStartInput(editorInfo, restarting);
- if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) {
- // AcceptTypedWord feature relies on CursorAnchorInfo.
- if (mSettings.getCurrent().mShouldShowUiToAcceptTypedWord) {
- InputConnectionCompatUtils.requestUpdateCursorAnchorInfo(
- getCurrentInputConnection(), true /* enableMonitor */,
- true /* requestImmediateCallback */);
- }
- }
}
@SuppressWarnings("deprecation")
@@ -859,7 +851,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// span, so we should reset our state unconditionally, even if restarting is true.
// We also tell the input logic about the combining rules for the current subtype, so
// it can adjust its combiners if needed.
- mInputLogic.startInput(mSubtypeSwitcher.getCombiningRulesExtraValueOfCurrentSubtype());
+ mInputLogic.startInput(mSubtypeSwitcher.getCombiningRulesExtraValueOfCurrentSubtype(),
+ currentSettingsValues);
// Note: the following does a round-trip IPC on the main thread: be careful
final Locale currentLocale = mSubtypeSwitcher.getCurrentSubtypeLocale();