aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-02-10 14:54:38 -0800
committerDan Zivkovic <zivkovic@google.com>2015-02-11 13:02:41 -0800
commit12d80ebead6a1d7f704a5a3af3b6fe3313ceab05 (patch)
tree3ab839123291ba254aec3189f6c2f20dd30016c8 /java/src/com/android/inputmethod/latin/RichInputMethodManager.java
parent2979fad21384bb595ba2baca8f5bbbfc053be921 (diff)
downloadlatinime-12d80ebead6a1d7f704a5a3af3b6fe3313ceab05.tar.gz
latinime-12d80ebead6a1d7f704a5a3af3b6fe3313ceab05.tar.xz
latinime-12d80ebead6a1d7f704a5a3af3b6fe3313ceab05.zip
Remove shortcut support from LatinIME.
Note this change does not affect the native decoder interface. Change-Id: I73b7dc008a5acaf75a31a36a2d332b5afabd82d0
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputMethodManager.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputMethodManager.java31
1 files changed, 6 insertions, 25 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
index 64a7cf347..c8e0b93bf 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
@@ -17,7 +17,6 @@
package com.android.inputmethod.latin;
import static com.android.inputmethod.latin.common.Constants.Subtype.KEYBOARD_MODE;
-import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.REQ_NETWORK_CONNECTIVITY;
import android.content.Context;
import android.content.SharedPreferences;
@@ -36,7 +35,6 @@ import com.android.inputmethod.compat.InputMethodManagerCompatWrapper;
import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils;
-import com.android.inputmethod.latin.utils.NetworkConnectivityUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import java.util.Collections;
@@ -288,24 +286,20 @@ public class RichInputMethodManager {
}
public boolean checkIfSubtypeBelongsToThisImeAndEnabled(final InputMethodSubtype subtype) {
- return checkIfSubtypeBelongsToImeAndEnabled(getInputMethodInfoOfThisIme(), subtype);
+ return checkIfSubtypeBelongsToList(subtype,
+ getEnabledInputMethodSubtypeList(
+ getInputMethodInfoOfThisIme(),
+ true /* allowsImplicitlySelectedSubtypes */));
}
public boolean checkIfSubtypeBelongsToThisImeAndImplicitlyEnabled(
final InputMethodSubtype subtype) {
final boolean subtypeEnabled = checkIfSubtypeBelongsToThisImeAndEnabled(subtype);
- final boolean subtypeExplicitlyEnabled = checkIfSubtypeBelongsToList(
- subtype, getMyEnabledInputMethodSubtypeList(
- false /* allowsImplicitlySelectedSubtypes */));
+ final boolean subtypeExplicitlyEnabled = checkIfSubtypeBelongsToList(subtype,
+ getMyEnabledInputMethodSubtypeList(false /* allowsImplicitlySelectedSubtypes */));
return subtypeEnabled && !subtypeExplicitlyEnabled;
}
- public boolean checkIfSubtypeBelongsToImeAndEnabled(final InputMethodInfo imi,
- final InputMethodSubtype subtype) {
- return checkIfSubtypeBelongsToList(subtype, getEnabledInputMethodSubtypeList(imi,
- true /* allowsImplicitlySelectedSubtypes */));
- }
-
private static boolean checkIfSubtypeBelongsToList(final InputMethodSubtype subtype,
final List<InputMethodSubtype> subtypes) {
return getSubtypeIndexInList(subtype, subtypes) != INDEX_NOT_FOUND;
@@ -564,16 +558,6 @@ public class RichInputMethodManager {
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
- public boolean isShortcutImeEnabled() {
- if (mShortcutInputMethodInfo == null) {
- return false;
- }
- if (mShortcutSubtype == null) {
- return true;
- }
- return checkIfSubtypeBelongsToImeAndEnabled(mShortcutInputMethodInfo, mShortcutSubtype);
- }
-
public boolean isShortcutImeReady() {
if (mShortcutInputMethodInfo == null) {
return false;
@@ -581,9 +565,6 @@ public class RichInputMethodManager {
if (mShortcutSubtype == null) {
return true;
}
- if (mShortcutSubtype.containsExtraValueKey(REQ_NETWORK_CONNECTIVITY)) {
- return NetworkConnectivityUtils.isNetworkConnected();
- }
return true;
}
}