aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputMethodManager.java17
2 files changed, 13 insertions, 16 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index f1b1b8db2..78867f153 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1596,18 +1596,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
public void onReleaseKey(final int primaryCode, final boolean withSliding) {
mKeyboardSwitcher.onReleaseKey(primaryCode, withSliding, getCurrentAutoCapsState(),
getCurrentRecapitalizeState());
-
- // If accessibility is on, ensure the user receives keyboard state updates.
- if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
- switch (primaryCode) {
- case Constants.CODE_SHIFT:
- AccessibleKeyboardViewProxy.getInstance().notifyShiftState();
- break;
- case Constants.CODE_SWITCH_ALPHA_SYMBOL:
- AccessibleKeyboardViewProxy.getInstance().notifySymbolsState();
- break;
- }
- }
}
private HardwareEventDecoder getHardwareKeyEventDecoder(final int deviceId) {
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
index 2b0be545e..64cc562c8 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
@@ -410,12 +410,21 @@ public final class RichInputMethodManager {
public boolean shouldOfferSwitchingToNextInputMethod(final IBinder binder,
boolean defaultValue) {
- // Use the default value instead on Jelly Bean MR2 and previous where
- // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} isn't yet available
- // and on KitKat where the API is still just a stub to return true always.
- if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
+ // Use the default value instead on Jelly Bean MR2 and previous, where
+ // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} isn't yet available.
+ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR2) {
return defaultValue;
}
+ // Use the default value instead on KitKat as well, where
+ // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} is still just a stub to
+ // return true always.
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
+ // Make sure this is actually KitKat.
+ // TODO: Consider to remove this check once the *next* version becomes available.
+ if (Build.VERSION.CODENAME.equals("REL")) {
+ return defaultValue;
+ }
+ }
return mImmWrapper.shouldOfferSwitchingToNextInputMethod(binder);
}
}