aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
1 files changed, 6 insertions, 4 deletions
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());
}