diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
3 files changed, 16 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/ContactsDictionary.java b/java/src/com/android/inputmethod/latin/ContactsDictionary.java index 83bc9046b..2f3395245 100644 --- a/java/src/com/android/inputmethod/latin/ContactsDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsDictionary.java @@ -28,6 +28,12 @@ import android.util.Log; import com.android.inputmethod.keyboard.Keyboard; +// TODO: This class is superseded by {@link ContactsBinaryDictionary}. Should be cleaned up. +/** + * An expandable dictionary that stores the words from Contacts provider. + * + * @deprecated Use {@link ContactsBinaryDictionary}. + */ public class ContactsDictionary extends ExpandableDictionary { private static final String[] PROJECTION = { diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 113941de3..b474a8558 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1056,6 +1056,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen | InputType.TYPE_TEXT_FLAG_CAP_WORDS)) == 0; if (noNeedToCheckCapsMode) return Constants.TextUtils.CAP_MODE_OFF; + // Avoid making heavy round-trip IPC calls of {@link InputConnection#getCursorCapsMode} + // unless needed. + if (mWordComposer.isComposingWord()) return Constants.TextUtils.CAP_MODE_OFF; + final InputConnection ic = getCurrentInputConnection(); if (ic == null) return Constants.TextUtils.CAP_MODE_OFF; // TODO: This blocking IPC call is heavy. Consider doing this without using IPC calls. @@ -1154,7 +1158,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Virtual codes representing custom requests. These are used in onCustomRequest() below. public static final int CODE_SHOW_INPUT_METHOD_PICKER = 1; - public static final int CODE_HAPTIC_AND_AUDIO_FEEDBACK = 2; @Override public boolean onCustomRequest(int requestCode) { @@ -1167,9 +1170,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen return true; } return false; - case CODE_HAPTIC_AND_AUDIO_FEEDBACK: - hapticAndAudioFeedback(Keyboard.CODE_UNSPECIFIED); - return true; } return false; } @@ -2265,6 +2265,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } + // TODO: Remove this method from {@link LatinIME} and move {@link FeedbackManager} to + // {@link KeyboardSwitcher}. public void hapticAndAudioFeedback(final int primaryCode) { mFeedbackManager.hapticAndAudioFeedback(primaryCode, mKeyboardSwitcher.getKeyboardView()); } diff --git a/java/src/com/android/inputmethod/latin/UserDictionary.java b/java/src/com/android/inputmethod/latin/UserDictionary.java index ea57db57c..81e2fdce4 100644 --- a/java/src/com/android/inputmethod/latin/UserDictionary.java +++ b/java/src/com/android/inputmethod/latin/UserDictionary.java @@ -29,10 +29,12 @@ import com.android.inputmethod.keyboard.ProximityInfo; import java.util.Arrays; +// TODO: This class is superseded by {@link UserBinaryDictionary}. Should be cleaned up. /** * An expandable dictionary that stores the words in the user unigram dictionary. - * To be deprecated: functionality being transferred to UserBinaryDictionary. -*/ + * + * @deprecated Use {@link UserBinaryDictionary}. + */ public class UserDictionary extends ExpandableDictionary { // TODO: use Words.SHORTCUT when it's public in the SDK |