Merge "Removed unused Imports, Added Type Arguments, removed some Warnings by using unused Methods and Variables"
diff --git a/apps/Term/src/com/android/term/Term.java b/apps/Term/src/com/android/term/Term.java
index 6041baf..b93ac33 100644
--- a/apps/Term/src/com/android/term/Term.java
+++ b/apps/Term/src/com/android/term/Term.java
@@ -2626,7 +2626,7 @@
 
     public EmulatorView(Context context) {
         super(context);
-        commonConstructor();
+        commonConstructor(context);
     }
 
     public void register(TermKeyListener listener) {
@@ -2796,17 +2796,17 @@
                 context.obtainStyledAttributes(android.R.styleable.View);
         initializeScrollbars(a);
         a.recycle();
-        commonConstructor();
+        commonConstructor(context);
     }
 
-    private void commonConstructor() {
+    private void commonConstructor(Context context) {
         mTextRenderer = null;
         mCursorPaint = new Paint();
         mCursorPaint.setARGB(255,128,128,128);
         mBackgroundPaint = new Paint();
         mTopRow = 0;
         mLeftColumn = 0;
-        mGestureDetector = new GestureDetector(this);
+        mGestureDetector = new GestureDetector(context, this, null);
         mGestureDetector.setIsLongpressEnabled(false);
         setVerticalScrollBarEnabled(true);
     }
diff --git a/samples/ApiDemos/src/com/example/android/apis/ApiDemos.java b/samples/ApiDemos/src/com/example/android/apis/ApiDemos.java
index 78b1fd7..39f24b6 100644
--- a/samples/ApiDemos/src/com/example/android/apis/ApiDemos.java
+++ b/samples/ApiDemos/src/com/example/android/apis/ApiDemos.java
@@ -52,8 +52,8 @@
         getListView().setTextFilterEnabled(true);
     }
 
-    protected List getData(String prefix) {
-        List<Map> myData = new ArrayList<Map>();
+    protected List<Map<String, Object>> getData(String prefix) {
+        List<Map<String, Object>> myData = new ArrayList<Map<String, Object>>();
 
         Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
         mainIntent.addCategory(Intent.CATEGORY_SAMPLE_CODE);
@@ -107,10 +107,11 @@
         return myData;
     }
 
-    private final static Comparator<Map> sDisplayNameComparator = new Comparator<Map>() {
+    private final static Comparator<Map<String, Object>> sDisplayNameComparator =
+        new Comparator<Map<String, Object>>() {
         private final Collator   collator = Collator.getInstance();
 
-        public int compare(Map map1, Map map2) {
+        public int compare(Map<String, Object> map1, Map<String, Object> map2) {
             return collator.compare(map1.get("title"), map2.get("title"));
         }
     };
@@ -128,7 +129,7 @@
         return result;
     }
 
-    protected void addItem(List<Map> data, String name, Intent intent) {
+    protected void addItem(List<Map<String, Object>> data, String name, Intent intent) {
         Map<String, Object> temp = new HashMap<String, Object>();
         temp.put("title", name);
         temp.put("intent", intent);
@@ -136,11 +137,11 @@
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     protected void onListItemClick(ListView l, View v, int position, long id) {
-        Map map = (Map) l.getItemAtPosition(position);
+        Map<String, Object> map = (Map<String, Object>)l.getItemAtPosition(position);
 
         Intent intent = (Intent) map.get("intent");
         startActivity(intent);
     }
-
 }
diff --git a/samples/ApiDemos/src/com/example/android/apis/animation/Transition3d.java b/samples/ApiDemos/src/com/example/android/apis/animation/Transition3d.java
index 38e69d0..a52b01b 100644
--- a/samples/ApiDemos/src/com/example/android/apis/animation/Transition3d.java
+++ b/samples/ApiDemos/src/com/example/android/apis/animation/Transition3d.java
@@ -101,7 +101,7 @@
         mContainer.startAnimation(rotation);
     }
 
-    public void onItemClick(AdapterView parent, View v, int position, long id) {
+    public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
         // Pre-load the image then start the animation
         mImageView.setImageResource(PHOTOS_RESOURCES[position]);
         applyRotation(position, 0, 90);
diff --git a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java
index 5f8874c..e2cd1ca 100644
--- a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java
+++ b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java
@@ -22,7 +22,6 @@
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.os.Bundle;
-import android.util.Log;
 import android.view.View;
 import android.widget.EditText;
 
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java
index 223300a..183a8ec 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java
@@ -23,7 +23,6 @@
 import java.nio.FloatBuffer;
 import java.nio.ShortBuffer;
 
-import javax.microedition.khronos.egl.EGL10;
 import javax.microedition.khronos.egl.EGLConfig;
 import javax.microedition.khronos.opengles.GL10;
 
diff --git a/samples/ApiDemos/src/com/example/android/apis/os/MorseCode.java b/samples/ApiDemos/src/com/example/android/apis/os/MorseCode.java
index dafa192..b8ae074 100644
--- a/samples/ApiDemos/src/com/example/android/apis/os/MorseCode.java
+++ b/samples/ApiDemos/src/com/example/android/apis/os/MorseCode.java
@@ -49,14 +49,9 @@
  */
 public class MorseCode extends Activity
 {
-    /** Tag string for our debug logs */
-    private static final String TAG = "MorseCode";
-
     /** Our text view */
     private TextView mTextView;
 
-    ;
-
     /**
      * Initialization of the Activity after it is first created.  Must at least
      * call {@link android.app.Activity#setContentView setContentView()} to
diff --git a/samples/ApiDemos/src/com/example/android/apis/text/LogTextBox.java b/samples/ApiDemos/src/com/example/android/apis/text/LogTextBox.java
index c78b54b..09957c5 100644
--- a/samples/ApiDemos/src/com/example/android/apis/text/LogTextBox.java
+++ b/samples/ApiDemos/src/com/example/android/apis/text/LogTextBox.java
@@ -20,13 +20,9 @@
 import android.content.Context;
 import android.text.method.ScrollingMovementMethod;
 import android.text.method.MovementMethod;
-import android.text.method.KeyListener;
-import android.text.method.TransformationMethod;
 import android.text.Editable;
 import android.util.AttributeSet;
 
-import java.util.Map;
-
 /**
  * This is a TextView that is Editable and by default scrollable,
  * like EditText without a cursor.