aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputConnection.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-10-20 14:48:56 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-10-21 19:28:37 +0900
commit5f00fe09e9a611b647592188316e5999465df4d3 (patch)
tree954a429256171897c7b9ed56a732e386eec76b2b /java/src/com/android/inputmethod/latin/RichInputConnection.java
parentfa1e65cb3a5dcce6299a6dd067cee95720107307 (diff)
downloadlatinime-5f00fe09e9a611b647592188316e5999465df4d3.tar.gz
latinime-5f00fe09e9a611b647592188316e5999465df4d3.tar.xz
latinime-5f00fe09e9a611b647592188316e5999465df4d3.zip
Fix some compiler warnings
This CL fixes the following compiler warnings. - Indirect access to static member - Access to a non-accessible member of an enclosing type - Parameter assignment - Method can be static - Local variable declaration hides another field or variable - Value of local variable is not used - Unused import - Unused private member - Unnecessary 'else' statement - Unnecessary declaration of throw exception - Redundant type arguments - Missing '@Override' annotation - Unused '@SuppressWarning' annotations Bug: 18003991 Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
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;