Merge "Refactor onModifiedTouchEvent of LatinKeyboardBaseView" into gingerbread
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 69c2b94..d0e143d 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -16,7 +16,6 @@
 
 package com.android.inputmethod.latin;
 
-import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
diff --git a/java/src/com/android/inputmethod/latin/Hints.java b/java/src/com/android/inputmethod/latin/Hints.java
index 689c8d8..2434d51 100644
--- a/java/src/com/android/inputmethod/latin/Hints.java
+++ b/java/src/com/android/inputmethod/latin/Hints.java
@@ -36,7 +36,6 @@
         public void showHint(int viewResource);
     }
 
-    private static final String TAG = "Hints";
     private static final String PREF_VOICE_HINT_NUM_UNIQUE_DAYS_SHOWN =
             "voice_hint_num_unique_days_shown";
     private static final String PREF_VOICE_HINT_LAST_TIME_SHOWN =
diff --git a/java/src/com/android/inputmethod/latin/InputLanguageSelection.java b/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
index 4f67227..7258874 100644
--- a/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
+++ b/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
@@ -40,7 +40,7 @@
         "ko", "ja", "zh", "el"
     };
 
-    private static class Loc implements Comparable {
+    private static class Loc implements Comparable<Object> {
         static Collator sCollator = Collator.getInstance();
 
         String label;
diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
index 88a2b83..dec29b7 100644
--- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
@@ -24,7 +24,6 @@
 import android.content.SharedPreferences;
 import android.content.res.Configuration;
 import android.content.res.Resources;
-import android.inputmethodservice.Keyboard;
 import android.preference.PreferenceManager;
 import android.view.InflateException;
 
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 0f724f0..0e6b18a 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -398,7 +398,6 @@
     static int[] getDictionary(Resources res) {
         String packageName = LatinIME.class.getPackage().getName();
         XmlResourceParser xrp = res.getXml(R.xml.dictionary);
-        int dictionaryCount = 0;
         ArrayList<Integer> dictionaries = new ArrayList<Integer>();
 
         try {
diff --git a/java/src/com/android/inputmethod/latin/LatinIMEBackupAgent.java b/java/src/com/android/inputmethod/latin/LatinIMEBackupAgent.java
index 568b31d..a14a475 100644
--- a/java/src/com/android/inputmethod/latin/LatinIMEBackupAgent.java
+++ b/java/src/com/android/inputmethod/latin/LatinIMEBackupAgent.java
@@ -24,6 +24,7 @@
  */
 public class LatinIMEBackupAgent extends BackupAgentHelper {
 
+    @Override
     public void onCreate() {
         addHelper("shared_pref", new SharedPreferencesBackupHelper(this,
                 getPackageName() + "_preferences"));
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index a96737f..92bbe43 100755
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -34,8 +34,6 @@
  */
 public class Suggest implements Dictionary.WordCallback {
 
-    private static final String TAG = "Suggest";
-
     public static final int APPROX_MAX_WORD_LENGTH = 32;
 
     public static final int CORRECTION_NONE = 0;
diff --git a/java/src/com/android/inputmethod/latin/Tutorial.java b/java/src/com/android/inputmethod/latin/Tutorial.java
index a812331..d3eaf30 100644
--- a/java/src/com/android/inputmethod/latin/Tutorial.java
+++ b/java/src/com/android/inputmethod/latin/Tutorial.java
@@ -17,7 +17,6 @@
 package com.android.inputmethod.latin;
 
 import android.content.Context;
-import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.Handler;
 import android.os.Message;
@@ -38,13 +37,9 @@
 public class Tutorial implements OnTouchListener {
     
     private List<Bubble> mBubbles = new ArrayList<Bubble>();
-    private long mStartTime;
-    private static final long MINIMUM_TIME = 6000;
-    private static final long MAXIMUM_TIME = 20000;
     private View mInputView;
     private LatinIME mIme;
     private int[] mLocation = new int[2];
-    private int mBubblePointerOffset;
     
     private static final int MSG_SHOW_BUBBLE = 0;
     
@@ -167,8 +162,6 @@
         mIme = ime;
         int inputWidth = inputView.getWidth();
         final int x = inputWidth / 20; // Half of 1/10th
-        mBubblePointerOffset = inputView.getContext().getResources()
-            .getDimensionPixelOffset(R.dimen.bubble_pointer_offset);
         Bubble bWelcome = new Bubble(context, inputView, 
                 R.drawable.dialog_bubble_step02, x, 0, 
                 R.string.tip_to_open_keyboard, R.string.touch_to_continue);
diff --git a/java/src/com/android/inputmethod/latin/UserBigramDictionary.java b/java/src/com/android/inputmethod/latin/UserBigramDictionary.java
index c3eab94..67d9c0b 100644
--- a/java/src/com/android/inputmethod/latin/UserBigramDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserBigramDictionary.java
@@ -374,8 +374,7 @@
                 c.close();
 
                 // insert new frequency
-                long s = db.insert(FREQ_TABLE_NAME, null,
-                        getFrequencyContentValues(pairId, bi.frequency));
+                db.insert(FREQ_TABLE_NAME, null, getFrequencyContentValues(pairId, bi.frequency));
             }
             checkPruneData(db);
             sUpdatingDB = false;
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 1ea7484..6772d53 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -17,7 +17,6 @@
 package com.android.inputmethod.latin;
 
 import java.util.ArrayList;
-import java.util.List;
 
 /**
  * A place to store the currently composing word with information such as adjacent key codes as well
@@ -50,7 +49,7 @@
     }
 
     WordComposer(WordComposer copy) {
-        mCodes = (ArrayList<int[]>) copy.mCodes.clone();
+        mCodes = new ArrayList<int[]>(copy.mCodes);
         mPreferredWord = copy.mPreferredWord;
         mTypedWord = new StringBuilder(copy.mTypedWord);
         mCapsCount = copy.mCapsCount;