diff options
author | 2012-10-01 13:46:16 -0700 | |
---|---|---|
committer | 2012-10-01 13:46:16 -0700 | |
commit | 37688ae8c16f5989750c295d08291a5a58cb22d0 (patch) | |
tree | 9a2446a91f2cc35f73aae228f51bc28b546a42d5 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | 033010382c12fe18882977017f6630107ca91c2d (diff) | |
parent | 86db54df74b821a15f7a3081c3737f8a63f91214 (diff) | |
download | latinime-37688ae8c16f5989750c295d08291a5a58cb22d0.tar.gz latinime-37688ae8c16f5989750c295d08291a5a58cb22d0.tar.xz latinime-37688ae8c16f5989750c295d08291a5a58cb22d0.zip |
am 86db54df: am 137203d4: am 574b80aa: Remove debug prints.
* commit '86db54df74b821a15f7a3081c3737f8a63f91214':
Remove debug prints.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 1acca5860..b27db579f 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -45,6 +45,7 @@ public final class RichInputConnection { private static final String TAG = RichInputConnection.class.getSimpleName(); private static final boolean DBG = false; private static final boolean DEBUG_PREVIOUS_TEXT = false; + private static final boolean DEBUG_BATCH_NESTING = false; // Provision for a long word pair and a separator private static final int LOOKBACK_CHARACTER_NUM = BinaryDictionary.MAX_WORD_LENGTH * 2 + 1; private static final Pattern spaceRegex = Pattern.compile("\\s+"); @@ -128,7 +129,7 @@ public final class RichInputConnection { Log.e(TAG, "Nest level too deep : " + mNestLevel); } } - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); } @@ -163,7 +164,7 @@ public final class RichInputConnection { } public void finishComposingText() { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); mCommittedTextBeforeComposingText.append(mComposingText); mCurrentCursorPosition += mComposingText.length(); @@ -177,7 +178,7 @@ public final class RichInputConnection { } public void commitText(final CharSequence text, final int i) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); mCommittedTextBeforeComposingText.append(text); mCurrentCursorPosition += text.length() - mComposingText.length(); @@ -247,7 +248,7 @@ public final class RichInputConnection { } public void deleteSurroundingText(final int i, final int j) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); final int remainingChars = mComposingText.length() - i; if (remainingChars >= 0) { mComposingText.setLength(remainingChars); @@ -283,7 +284,7 @@ public final class RichInputConnection { } public void sendKeyEvent(final KeyEvent keyEvent) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); // This method is only called for enter or backspace when speaking to old @@ -331,7 +332,7 @@ public final class RichInputConnection { } public void setComposingText(final CharSequence text, final int i) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); mCurrentCursorPosition += text.length() - mComposingText.length(); mComposingText.setLength(0); @@ -347,7 +348,7 @@ public final class RichInputConnection { } public void setSelection(final int from, final int to) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); if (null != mIC) { mIC.setSelection(from, to); @@ -361,7 +362,7 @@ public final class RichInputConnection { } public void commitCorrection(final CorrectionInfo correctionInfo) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); // This has no effect on the text field and does not change its content. It only makes // TextView flash the text for a second based on indices contained in the argument. @@ -375,7 +376,7 @@ public final class RichInputConnection { } public void commitCompletion(final CompletionInfo completionInfo) { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); final CharSequence text = completionInfo.getText(); mCommittedTextBeforeComposingText.append(text); @@ -575,7 +576,7 @@ public final class RichInputConnection { } public void removeTrailingSpace() { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); final CharSequence lastOne = getTextBeforeCursor(1, 0); if (lastOne != null && lastOne.length() == 1 && lastOne.charAt(0) == Keyboard.CODE_SPACE) { @@ -631,7 +632,7 @@ public final class RichInputConnection { } public boolean revertDoubleSpace() { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); // Here we test whether we indeed have a period and a space before us. This should not // be needed, but it's there just in case something went wrong. final CharSequence textBeforeCursor = getTextBeforeCursor(2, 0); @@ -649,7 +650,7 @@ public final class RichInputConnection { } public boolean revertSwapPunctuation() { - checkBatchEdit(); + if (DEBUG_BATCH_NESTING) checkBatchEdit(); // Here we test whether we indeed have a space and something else before us. This should not // be needed, but it's there just in case something went wrong. final CharSequence textBeforeCursor = getTextBeforeCursor(2, 0); |