Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1491)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java

Issue 12545043: Fix several findbugs issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
index f80b2598e28940c0bf9f67ccb18b9261d1521ab1..224f070859158e54a37ee558b46569bd3b11c138 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
@@ -111,16 +111,16 @@ class ImeAdapter {
private int mNativeImeAdapterAndroid;
private int mTextInputType;
- private Context mContext;
+ private final Context mContext;
private InputMethodManagerWrapper mInputMethodManagerWrapper;
- private SelectionHandleController mSelectionHandleController;
- private InsertionHandleController mInsertionHandleController;
+ private final SelectionHandleController mSelectionHandleController;
+ private final InsertionHandleController mInsertionHandleController;
private AdapterInputConnection mInputConnection;
- private ViewEmbedder mViewEmbedder;
- private Handler mHandler;
+ private final ViewEmbedder mViewEmbedder;
+ private final Handler mHandler;
private class DelayedDismissInput implements Runnable {
- private int mNativeImeAdapter;
+ private final int mNativeImeAdapter;
DelayedDismissInput(int nativeImeAdapter) {
mNativeImeAdapter = nativeImeAdapter;
@@ -471,8 +471,8 @@ class ImeAdapter {
// It then adapts android's IME to chrome's RenderWidgetHostView using the
// native ImeAdapterAndroid via the outer class ImeAdapter.
public static class AdapterInputConnection extends BaseInputConnection {
- private View mInternalView;
- private ImeAdapter mImeAdapter;
+ private final View mInternalView;
+ private final ImeAdapter mImeAdapter;
private boolean mSingleLine;
private int mNumNestedBatchEdits = 0;
private boolean mIgnoreTextInputStateUpdates = false;
@@ -498,7 +498,6 @@ class ImeAdapter {
int prevSelectionStart = Selection.getSelectionStart(editable);
int prevSelectionEnd = Selection.getSelectionEnd(editable);
- int prevEditableLength = editable.length();
int prevCompositionStart = getComposingSpanStart(editable);
int prevCompositionEnd = getComposingSpanEnd(editable);
String prevText = editable.toString();

Powered by Google App Engine
This is Rietveld 408576698