aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputConnection.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-10-21 15:10:07 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-21 15:10:07 +0000
commitd94645097a8aab6c44c6a20553f81954009dbc5b (patch)
tree8743018b4a2fe61f16943783f5b2331592e3a69d /java/src/com/android/inputmethod/latin/RichInputConnection.java
parent20ae86172e644b1aae97e0ea22c41433bd7ccc9e (diff)
parent46a007261fcbfbe887e22ecdf16307f95b1e4024 (diff)
downloadlatinime-d94645097a8aab6c44c6a20553f81954009dbc5b.tar.gz
latinime-d94645097a8aab6c44c6a20553f81954009dbc5b.tar.xz
latinime-d94645097a8aab6c44c6a20553f81954009dbc5b.zip
am 46a00726: Merge "Fix some compiler warnings"
* commit '46a007261fcbfbe887e22ecdf16307f95b1e4024': Fix some compiler warnings
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index a3f7bb4d6..2c17660d8 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -44,8 +44,6 @@ import com.android.inputmethod.latin.utils.SpannableStringUtils;
import com.android.inputmethod.latin.utils.StringUtils;
import com.android.inputmethod.latin.utils.TextRange;
-import java.util.Arrays;
-
/**
* Enrichment class for InputConnection to simplify interaction and add functionality.
*
@@ -91,7 +89,7 @@ public final class RichInputConnection implements PrivateCommandPerformer {
/**
* This variable is a temporary object used in
- * {@link #commitTextWithBackgroundColor(CharSequence, int, int)} to avoid object creation.
+ * {@link #commitTextWithBackgroundColor(CharSequence,int,int,int)} to avoid object creation.
*/
private SpannableStringBuilder mTempObjectForCommitText = new SpannableStringBuilder();
/**
@@ -151,9 +149,8 @@ public final class RichInputConnection implements PrivateCommandPerformer {
} else {
if (DBG) {
throw new RuntimeException("Nest level too deep");
- } else {
- Log.e(TAG, "Nest level too deep : " + mNestLevel);
}
+ Log.e(TAG, "Nest level too deep : " + mNestLevel);
}
if (DEBUG_BATCH_NESTING) checkBatchEdit();
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
@@ -351,10 +348,9 @@ public final class RichInputConnection implements PrivateCommandPerformer {
// If we have some composing text and a space before, then we should have
// MODE_CHARACTERS and MODE_WORDS on.
return (TextUtils.CAP_MODE_CHARACTERS | TextUtils.CAP_MODE_WORDS) & inputType;
- } else {
- // We have some composing text - we should be in MODE_CHARACTERS only.
- return TextUtils.CAP_MODE_CHARACTERS & inputType;
}
+ // We have some composing text - we should be in MODE_CHARACTERS only.
+ return TextUtils.CAP_MODE_CHARACTERS & inputType;
}
// TODO: this will generally work, but there may be cases where the buffer contains SOME
// information but not enough to determine the caps mode accurately. This may happen after
@@ -624,10 +620,6 @@ public final class RichInputConnection implements PrivateCommandPerformer {
prev, spacingAndPunctuations, n);
}
- private static boolean isSeparator(final int code, final int[] sortedSeparators) {
- return Arrays.binarySearch(sortedSeparators, code) >= 0;
- }
-
private static boolean isPartOfCompositionForScript(final int codePoint,
final SpacingAndPunctuations spacingAndPunctuations, final int scriptId) {
// We always consider word connectors part of compositions.
@@ -977,7 +969,8 @@ public final class RichInputConnection implements PrivateCommandPerformer {
/**
* @return {@code true} if the application reported that the monitor mode of
- * {@link InputMethodService#onUpdateCursorAnchorInfo(CursorAnchorInfo)} is currently enabled.
+ * {@link InputMethodService#onUpdateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo)}
+ * is currently enabled.
*/
public boolean isCursorAnchorInfoMonitorEnabled() {
return mCursorAnchorInfoMonitorEnabled;