Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java b/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java |
| index db32292caff47881356c97f75f0b02241fb8f8ed..21534ecb432f00e3e941f48fa60170097df676b9 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java |
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java |
| @@ -166,8 +166,8 @@ public class AdapterInputConnection extends BaseInputConnection { |
| public void updateState(String text, int selectionStart, int selectionEnd, int compositionStart, |
| int compositionEnd, boolean isNonImeChange) { |
| if (DEBUG) { |
| - Log.w(TAG, "updateState [" + text + "] [" + selectionStart + " " + selectionEnd + "] [" |
| - + compositionStart + " " + compositionEnd + "] [" + isNonImeChange + "]"); |
| + Log.w(TAG, "updateState [%s] [%s] [%s] [%s] [%s] [%b]" , text, selectionStart, |
|
AKVT
2015/06/16 08:48:54
nit: no space before ,
[%s] [%b]" , -> [%s] [%b]"
|
| + selectionEnd, compositionStart, compositionEnd, isNonImeChange); |
| } |
| // If this update is from the IME, no further state modification is necessary because the |
| // state should have been updated already by the IM framework directly. |
| @@ -224,8 +224,8 @@ public class AdapterInputConnection extends BaseInputConnection { |
| return; |
| } |
| if (DEBUG) { |
| - Log.w(TAG, "updateSelectionIfRequired [" + selectionStart + " " + selectionEnd + "] [" |
| - + compositionStart + " " + compositionEnd + "]"); |
| + Log.w(TAG, "updateSelectionIfRequired [%d %d] [%d %d]", selectionStart, selectionEnd, |
| + compositionStart, compositionEnd); |
| } |
| // updateSelection should be called every time the selection or composition changes |
| // if it happens not within a batch edit, or at the end of each top level batch edit. |
| @@ -242,7 +242,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean setComposingText(CharSequence text, int newCursorPosition) { |
| - if (DEBUG) Log.w(TAG, "setComposingText [" + text + "] [" + newCursorPosition + "]"); |
| + if (DEBUG) Log.w(TAG, "setComposingText [%s] [%d]", text, newCursorPosition); |
| if (maybePerformEmptyCompositionWorkaround(text)) return true; |
| mPendingAccent = 0; |
| super.setComposingText(text, newCursorPosition); |
| @@ -255,7 +255,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean commitText(CharSequence text, int newCursorPosition) { |
| - if (DEBUG) Log.w(TAG, "commitText [" + text + "] [" + newCursorPosition + "]"); |
| + if (DEBUG) Log.w(TAG, "commitText [%s] [%d]", text, newCursorPosition); |
| if (maybePerformEmptyCompositionWorkaround(text)) return true; |
| mPendingAccent = 0; |
| super.commitText(text, newCursorPosition); |
| @@ -269,7 +269,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean performEditorAction(int actionCode) { |
| - if (DEBUG) Log.w(TAG, "performEditorAction [" + actionCode + "]"); |
| + if (DEBUG) Log.w(TAG, "performEditorAction [%d]", actionCode); |
| if (actionCode == EditorInfo.IME_ACTION_NEXT) { |
| restartInput(); |
| // Send TAB key event |
| @@ -289,7 +289,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean performContextMenuAction(int id) { |
| - if (DEBUG) Log.w(TAG, "performContextMenuAction [" + id + "]"); |
| + if (DEBUG) Log.w(TAG, "performContextMenuAction [%d]", id); |
| switch (id) { |
| case android.R.id.selectAll: |
| return mImeAdapter.selectAll(); |
| @@ -325,7 +325,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean beginBatchEdit() { |
| - if (DEBUG) Log.w(TAG, "beginBatchEdit [" + (mNumNestedBatchEdits == 0) + "]"); |
| + if (DEBUG) Log.w(TAG, "beginBatchEdit [%b]", (mNumNestedBatchEdits == 0)); |
| mNumNestedBatchEdits++; |
| return true; |
| } |
| @@ -337,7 +337,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| public boolean endBatchEdit() { |
| if (mNumNestedBatchEdits == 0) return false; |
| --mNumNestedBatchEdits; |
| - if (DEBUG) Log.w(TAG, "endBatchEdit [" + (mNumNestedBatchEdits == 0) + "]"); |
| + if (DEBUG) Log.w(TAG, "endBatchEdit [%b]", (mNumNestedBatchEdits == 0)); |
| if (mNumNestedBatchEdits == 0) updateSelectionIfRequired(); |
| return mNumNestedBatchEdits != 0; |
| } |
| @@ -365,8 +365,8 @@ public class AdapterInputConnection extends BaseInputConnection { |
| private boolean deleteSurroundingTextImpl( |
| int beforeLength, int afterLength, boolean fromPhysicalKey) { |
| if (DEBUG) { |
| - Log.w(TAG, "deleteSurroundingText [" + beforeLength + " " + afterLength + " " |
| - + fromPhysicalKey + "]"); |
| + Log.w(TAG, "deleteSurroundingText [%d %d %b]", beforeLength, afterLength, |
| + fromPhysicalKey); |
| } |
| if (mPendingAccent != 0) { |
| @@ -430,7 +430,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| @Override |
| public boolean sendKeyEvent(KeyEvent event) { |
| if (DEBUG) { |
| - Log.w(TAG, "sendKeyEvent [" + event.getAction() + "] [" + event.getKeyCode() + "]"); |
| + Log.w(TAG, "sendKeyEvent [%d %d]", event.getAction(), event.getKeyCode()); |
| } |
| int action = event.getAction(); |
| @@ -526,7 +526,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean setSelection(int start, int end) { |
| - if (DEBUG) Log.w(TAG, "setSelection [" + start + " " + end + "]"); |
| + if (DEBUG) Log.w(TAG, "setSelection [%d %d]", start, end); |
| int textLength = mEditable.length(); |
| if (start < 0 || end < 0 || start > textLength || end > textLength) return true; |
| super.setSelection(start, end); |
| @@ -550,7 +550,7 @@ public class AdapterInputConnection extends BaseInputConnection { |
| */ |
| @Override |
| public boolean setComposingRegion(int start, int end) { |
| - if (DEBUG) Log.w(TAG, "setComposingRegion [" + start + " " + end + "]"); |
| + if (DEBUG) Log.w(TAG, "setComposingRegion [%d %d]", start, end); |
| int textLength = mEditable.length(); |
| int a = Math.min(start, end); |
| int b = Math.max(start, end); |