Fix warnings and remove dead code

Change-Id: I574d823fedf4b752c3df5a72599b390f708823ac
diff --git a/src/com/android/launcher2/AppWidgetResizeFrame.java b/src/com/android/launcher2/AppWidgetResizeFrame.java
index 0959a34..9df6f32 100644
--- a/src/com/android/launcher2/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher2/AppWidgetResizeFrame.java
@@ -16,8 +16,6 @@
 import com.android.launcher.R;
 
 public class AppWidgetResizeFrame extends FrameLayout {
-
-    private ItemInfo mItemInfo;
     private LauncherAppWidgetHostView mWidgetView;
     private CellLayout mCellLayout;
     private DragLayer mDragLayer;
@@ -69,12 +67,11 @@
 
     private Launcher mLauncher;
 
-    public AppWidgetResizeFrame(Context context, ItemInfo itemInfo, 
+    public AppWidgetResizeFrame(Context context,
             LauncherAppWidgetHostView widgetView, CellLayout cellLayout, DragLayer dragLayer) {
 
         super(context);
         mLauncher = (Launcher) context;
-        mItemInfo = itemInfo;
         mCellLayout = cellLayout;
         mWidgetView = widgetView;
         mResizeMode = widgetView.getAppWidgetInfo().resizeMode;
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 3d5d06a..2467871 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -1214,8 +1214,6 @@
 
                 // Determine the widget spans and min resize spans.
                 int[] spanXY = mLauncher.getSpanForWidget(info);
-                int[] size = mLauncher.getWorkspace().estimateItemSize(spanXY[0],
-                        spanXY[1], createItemInfo, true);
                 createItemInfo.spanX = spanXY[0];
                 createItemInfo.spanY = spanXY[1];
                 int[] minSpanXY = mLauncher.getMinSpanForWidget(info);
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index a775ed5..526fda7 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -20,8 +20,6 @@
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
 import android.graphics.Rect;
 import android.graphics.Region;
 import android.graphics.Region.Op;
@@ -30,8 +28,6 @@
 import android.view.MotionEvent;
 import android.widget.TextView;
 
-import com.android.launcher.R;
-
 /**
  * TextView that draws a bubble behind the text. We cannot use a LineBackgroundSpan
  * because we want to make the bubble taller than the text and TextView's clip is
@@ -85,7 +81,6 @@
         mBackground = getBackground();
 
         final Resources res = getContext().getResources();
-        int bubbleColor = res.getColor(R.color.bubble_dark_background);
         mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor =
             res.getColor(android.R.color.holo_blue_light);
 
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 26a3ecf..a48a815 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -268,7 +268,9 @@
                     // If an animation is started and then stopped very quickly, we can still
                     // get spurious updates we've cleared the tag. Guard against this.
                     if (outline == null) {
-                        if (false) {
+                        @SuppressWarnings("all") // suppress dead code warning
+                        final boolean debug = false;
+                        if (debug) {
                             Object val = animation.getAnimatedValue();
                             Log.d(TAG, "anim " + thisIndex + " update: " + val +
                                      ", isStopped " + anim.isStopped());
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index f2db487..b3b14f4 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -40,7 +40,6 @@
  * Class for initiating a drag within a view or across multiple views.
  */
 public class DragController {
-    @SuppressWarnings({"UnusedDeclaration"})
     private static final String TAG = "Launcher.DragController";
 
     /** Indicates the drag is a move.  */
@@ -347,7 +346,6 @@
      *              || super.dispatchKeyEvent(event);
      * </pre>
      */
-    @SuppressWarnings({"UnusedDeclaration"})
     public boolean dispatchKeyEvent(KeyEvent event) {
         return mDragging;
     }
@@ -457,7 +455,9 @@
      * Call this from a drag source view.
      */
     public boolean onInterceptTouchEvent(MotionEvent ev) {
-        if (false) {
+        @SuppressWarnings("all") // suppress dead code warning
+        final boolean debug = false;
+        if (debug) {
             Log.d(Launcher.TAG, "DragController.onInterceptTouchEvent " + ev + " mDragging="
                     + mDragging);
         }
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java
index e4e48d0..f71baec 100644
--- a/src/com/android/launcher2/DragLayer.java
+++ b/src/com/android/launcher2/DragLayer.java
@@ -23,9 +23,6 @@
 import android.animation.ValueAnimator.AnimatorUpdateListener;
 import android.content.Context;
 import android.content.res.Resources;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.PointF;
 import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.view.KeyEvent;
@@ -34,7 +31,6 @@
 import android.view.ViewParent;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager;
-import android.view.animation.AnimationUtils;
 import android.view.animation.DecelerateInterpolator;
 import android.view.animation.Interpolator;
 import android.widget.FrameLayout;
@@ -402,7 +398,7 @@
     public void addResizeFrame(ItemInfo itemInfo, LauncherAppWidgetHostView widget,
             CellLayout cellLayout) {
         AppWidgetResizeFrame resizeFrame = new AppWidgetResizeFrame(getContext(),
-                itemInfo, widget, cellLayout, this);
+                widget, cellLayout, this);
 
         LayoutParams lp = new LayoutParams(-1, -1);
         lp.customPosition = true;
diff --git a/src/com/android/launcher2/DragView.java b/src/com/android/launcher2/DragView.java
index a6aa595..b6645e1 100644
--- a/src/com/android/launcher2/DragView.java
+++ b/src/com/android/launcher2/DragView.java
@@ -167,8 +167,9 @@
 
     @Override
     protected void onDraw(Canvas canvas) {
-        if (false) {
-            // for debugging
+        @SuppressWarnings("all") // suppress dead code warning
+        final boolean debug = false;
+        if (debug) {
             Paint p = new Paint();
             p.setStyle(Paint.Style.FILL);
             p.setColor(0x66ffffff);
diff --git a/src/com/android/launcher2/DrawableStateProxyView.java b/src/com/android/launcher2/DrawableStateProxyView.java
index 498730f..dac9584 100644
--- a/src/com/android/launcher2/DrawableStateProxyView.java
+++ b/src/com/android/launcher2/DrawableStateProxyView.java
@@ -18,12 +18,8 @@
 
 import android.content.Context;
 import android.content.res.TypedArray;
-import android.graphics.Canvas;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.StateListDrawable;
 import android.util.AttributeSet;
 import android.view.View;
-import android.widget.ImageView;
 import android.widget.LinearLayout;
 
 import com.android.launcher.R;
diff --git a/src/com/android/launcher2/FocusHelper.java b/src/com/android/launcher2/FocusHelper.java
index ecc9d9c..0066440 100644
--- a/src/com/android/launcher2/FocusHelper.java
+++ b/src/com/android/launcher2/FocusHelper.java
@@ -626,7 +626,6 @@
             int lineDelta) {
         final ArrayList<View> views = getCellLayoutChildrenSortedSpatially(layout, parent);
         final CellLayout.LayoutParams lp = (CellLayout.LayoutParams) v.getLayoutParams();
-        final int cellCountX = layout.getCountX();
         final int cellCountY = layout.getCountY();
         final int row = lp.cellY;
         final int newRow = row + lineDelta;
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index c502fb7..fcaf020 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -44,7 +44,6 @@
 import android.widget.TextView;
 
 import com.android.launcher.R;
-import com.android.launcher2.DropTarget.DragObject;
 import com.android.launcher2.FolderInfo.FolderListener;
 
 import java.util.ArrayList;
@@ -56,6 +55,7 @@
         View.OnLongClickListener, DropTarget, FolderListener, TextView.OnEditorActionListener,
         View.OnFocusChangeListener {
 
+    @SuppressWarnings("unused")
     private static final String TAG = "Launcher.Folder";
 
     protected DragController mDragController;
diff --git a/src/com/android/launcher2/FolderIcon.java b/src/com/android/launcher2/FolderIcon.java
index 513fa6b..2377f30 100644
--- a/src/com/android/launcher2/FolderIcon.java
+++ b/src/com/android/launcher2/FolderIcon.java
@@ -119,8 +119,9 @@
 
     static FolderIcon fromXml(int resId, Launcher launcher, ViewGroup group,
             FolderInfo folderInfo, IconCache iconCache) {
-
-        if (INITIAL_ITEM_ANIMATION_DURATION >= DROP_IN_ANIMATION_DURATION) {
+        @SuppressWarnings("all") // suppress dead code warning
+        final boolean error = INITIAL_ITEM_ANIMATION_DURATION >= DROP_IN_ANIMATION_DURATION;
+        if (error) {
             throw new IllegalStateException("DROP_IN_ANIMATION_DURATION must be greater than " +
                     "INITIAL_ITEM_ANIMATION_DURATION, as sequencing of adding first two items " +
                     "is dependent on this");
diff --git a/src/com/android/launcher2/Hotseat.java b/src/com/android/launcher2/Hotseat.java
index fbb45b9..a6c9fb2 100644
--- a/src/com/android/launcher2/Hotseat.java
+++ b/src/com/android/launcher2/Hotseat.java
@@ -28,6 +28,7 @@
 import com.android.launcher.R;
 
 public class Hotseat extends FrameLayout {
+    @SuppressWarnings("unused")
     private static final String TAG = "Hotseat";
 
     private Launcher mLauncher;
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 1e8379d..efa9fac 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -33,6 +33,7 @@
  * Cache of application icons.  Icons can be made from any thread.
  */
 public class IconCache {
+    @SuppressWarnings("unused")
     private static final String TAG = "Launcher.IconCache";
 
     private static final int INITIAL_ICON_CACHE_CAPACITY = 50;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 0f700e2..a3b98f8 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1528,7 +1528,6 @@
 
     void addAppWidgetImpl(final int appWidgetId, final PendingAddWidgetInfo info) {
         final AppWidgetProviderInfo appWidget = info.info;
-        Runnable configurationActivity = null;
         if (appWidget.configure != null) {
             // Launch over to configure widget, if needed
             Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
@@ -2155,14 +2154,6 @@
         showDialog(DIALOG_RENAME_FOLDER);
     }
 
-    private void showAddDialog() {
-        resetAddInfo();
-        mPendingAddInfo.container = LauncherSettings.Favorites.CONTAINER_DESKTOP;
-        mPendingAddInfo.screen = mWorkspace.getCurrentPage();
-        mWaitingForResult = true;
-        showDialog(DIALOG_CREATE_SHORTCUT);
-    }
-
     private class RenameFolder {
         private EditText mInput;
 
@@ -2470,7 +2461,7 @@
                                 }
                             }
                         });
-                        observer.removeGlobalOnLayoutListener(this);
+                        observer.removeOnGlobalLayoutListener(this);
                     }
                 };
                 observer.addOnGlobalLayoutListener(delayedStart);
diff --git a/src/com/android/launcher2/LauncherAppWidgetHostView.java b/src/com/android/launcher2/LauncherAppWidgetHostView.java
index d73dd30..e34196e 100644
--- a/src/com/android/launcher2/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher2/LauncherAppWidgetHostView.java
@@ -21,7 +21,6 @@
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewConfiguration;
 import android.view.ViewGroup;
 
 import com.android.launcher.R;
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index ef1eb5f..28362fd 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -25,7 +25,6 @@
 import android.content.res.Configuration;
 import android.database.ContentObserver;
 import android.os.Handler;
-import android.view.MotionEvent;
 
 import com.android.launcher.R;
 
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index d29e2e6..efe4711 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -1035,9 +1035,9 @@
                         (LauncherSettings.Favorites.SPANX);
                 final int spanYIndex = c.getColumnIndexOrThrow(
                         LauncherSettings.Favorites.SPANY);
-                final int uriIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.URI);
-                final int displayModeIndex = c.getColumnIndexOrThrow(
-                        LauncherSettings.Favorites.DISPLAY_MODE);
+                //final int uriIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.URI);
+                //final int displayModeIndex = c.getColumnIndexOrThrow(
+                //        LauncherSettings.Favorites.DISPLAY_MODE);
 
                 ShortcutInfo info;
                 String intentDescription;
@@ -1825,7 +1825,9 @@
     }
 
     Bitmap getIconFromCursor(Cursor c, int iconIndex, Context context) {
-        if (false) {
+        @SuppressWarnings("all") // suppress dead code warning
+        final boolean debug = false;
+        if (debug) {
             Log.d(TAG, "getIconFromCursor app="
                     + c.getString(c.getColumnIndexOrThrow(LauncherSettings.Favorites.TITLE)));
         }
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index 4149ab6..d2aa31f 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -31,6 +31,7 @@
         void iconPressed(PagedViewIcon icon);
     }
 
+    @SuppressWarnings("unused")
     private static final String TAG = "PagedViewIcon";
     private static final float PRESS_ALPHA = 0.4f;
 
diff --git a/src/com/android/launcher2/RocketLauncher.java b/src/com/android/launcher2/RocketLauncher.java
index 505ac4c..268769d 100644
--- a/src/com/android/launcher2/RocketLauncher.java
+++ b/src/com/android/launcher2/RocketLauncher.java
@@ -332,7 +332,7 @@
         protected void onAttachedToWindow() {
             super.onAttachedToWindow();
             setLayerType(View.LAYER_TYPE_HARDWARE, null);
-            setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
+            setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
 
             reset();
             mAnim.start();
diff --git a/src/com/android/launcher2/SearchDropTargetBar.java b/src/com/android/launcher2/SearchDropTargetBar.java
index 76d7076..30978a8 100644
--- a/src/com/android/launcher2/SearchDropTargetBar.java
+++ b/src/com/android/launcher2/SearchDropTargetBar.java
@@ -246,7 +246,7 @@
                 mQSBSearchBar.setBackgroundResource(0);
             } else if (mPreviousBackground != null && (searchVisible || voiceVisible)) {
                 // Restore the background
-                mQSBSearchBar.setBackgroundDrawable(mPreviousBackground);
+                mQSBSearchBar.setBackground(mPreviousBackground);
             }
         }
     }
diff --git a/src/com/android/launcher2/ShortcutAndWidgetContainer.java b/src/com/android/launcher2/ShortcutAndWidgetContainer.java
index 7e5e940..8bebdcd 100644
--- a/src/com/android/launcher2/ShortcutAndWidgetContainer.java
+++ b/src/com/android/launcher2/ShortcutAndWidgetContainer.java
@@ -24,8 +24,6 @@
 import android.view.View;
 import android.view.ViewGroup;
 
-import com.android.launcher2.CellLayout.LayoutParams;
-
 public class ShortcutAndWidgetContainer extends ViewGroup {
     static final String TAG = "CellLayoutChildren";
 
@@ -73,8 +71,10 @@
 
     @Override
     protected void dispatchDraw(Canvas canvas) {
-        // Debug drawing for hit space
-        if (false) {
+        @SuppressWarnings("all") // suppress dead code warning
+        final boolean debug = false;
+        if (debug) {
+            // Debug drawing for hit space
             Paint p = new Paint();
             p.setColor(0x6600FF00);
             for (int i = getChildCount() - 1; i >= 0; i--) {
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index 0387011..b27f7bb 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -41,6 +41,7 @@
  * Various utilities shared amongst the Launcher's classes.
  */
 final class Utilities {
+    @SuppressWarnings("unused")
     private static final String TAG = "Launcher.Utilities";
 
     private static int sIconWidth = -1;
@@ -83,7 +84,8 @@
             return icon;
         } else {
             // Icon is too small, render to a larger bitmap
-            return createIconBitmap(new BitmapDrawable(icon), context);
+            final Resources resources = context.getResources();
+            return createIconBitmap(new BitmapDrawable(resources, icon), context);
         }
     }
 
@@ -142,7 +144,9 @@
             final int left = (textureWidth-width) / 2;
             final int top = (textureHeight-height) / 2;
 
-            if (false) {
+            @SuppressWarnings("all") // suppress dead code warning
+            final boolean debug = false;
+            if (debug) {
                 // draw a big box for the icon for debugging
                 canvas.drawColor(sColors[sColorIndex]);
                 if (++sColorIndex >= sColors.length) sColorIndex = 0;
@@ -205,7 +209,8 @@
             if (bitmap.getWidth() == sIconWidth && bitmap.getHeight() == sIconHeight) {
                 return bitmap;
             } else {
-                return createIconBitmap(new BitmapDrawable(bitmap), context);
+                final Resources resources = context.getResources();
+                return createIconBitmap(new BitmapDrawable(resources, bitmap), context);
             }
         }
     }
diff --git a/src/com/android/launcher2/WallpaperChooser.java b/src/com/android/launcher2/WallpaperChooser.java
index 8a9d92f..77e1e6f 100644
--- a/src/com/android/launcher2/WallpaperChooser.java
+++ b/src/com/android/launcher2/WallpaperChooser.java
@@ -24,6 +24,7 @@
 import android.os.Bundle;
 
 public class WallpaperChooser extends Activity {
+    @SuppressWarnings("unused")
     private static final String TAG = "Launcher.WallpaperChooser";
 
     @Override
diff --git a/src/com/android/launcher2/WallpaperChooserDialogFragment.java b/src/com/android/launcher2/WallpaperChooserDialogFragment.java
index eec699e..b99d8ec 100644
--- a/src/com/android/launcher2/WallpaperChooserDialogFragment.java
+++ b/src/com/android/launcher2/WallpaperChooserDialogFragment.java
@@ -137,7 +137,7 @@
          */
         if (mEmbedded) {
             View view = inflater.inflate(R.layout.wallpaper_chooser, container, false);
-            view.setBackgroundDrawable(mWallpaperDrawable);
+            view.setBackground(mWallpaperDrawable);
 
             final Gallery gallery = (Gallery) view.findViewById(R.id.gallery);
             gallery.setCallbackDuringFling(false);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 86f4611..b047eb0 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -26,7 +26,6 @@
 import android.appwidget.AppWidgetHostView;
 import android.appwidget.AppWidgetManager;
 import android.appwidget.AppWidgetProviderInfo;
-import android.content.ClipDescription;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -35,40 +34,32 @@
 import android.graphics.Bitmap;
 import android.graphics.Camera;
 import android.graphics.Canvas;
-import android.graphics.Color;
 import android.graphics.Matrix;
 import android.graphics.Paint;
 import android.graphics.Point;
 import android.graphics.PointF;
 import android.graphics.Rect;
 import android.graphics.Region.Op;
-import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.IBinder;
 import android.os.Parcelable;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.Log;
-import android.util.Pair;
 import android.view.Display;
-import android.view.DragEvent;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.animation.AccelerateInterpolator;
 import android.view.animation.DecelerateInterpolator;
 import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.android.launcher.R;
-import com.android.launcher2.DropTarget.DragObject;
 import com.android.launcher2.FolderIcon.FolderRingAnimator;
-import com.android.launcher2.InstallWidgetReceiver.WidgetMimeTypeHandlerData;
 import com.android.launcher2.LauncherSettings.Favorites;
 
 import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.List;
 
 /**
  * The workspace is a wide area with a wallpaper and a finite number of pages.
@@ -78,7 +69,6 @@
 public class Workspace extends SmoothPagedView
         implements DropTarget, DragSource, DragScroller, View.OnTouchListener,
         DragController.DragListener, LauncherTransitionable {
-    @SuppressWarnings({"UnusedDeclaration"})
     private static final String TAG = "Launcher.Workspace";
 
     // Y rotation to apply to the workspace screens
@@ -144,8 +134,6 @@
      */
     private CellLayout mDropToLayout = null;
 
-    private boolean mDragHasEnteredWorkspace = false;
-
     private Launcher mLauncher;
     private IconCache mIconCache;
     private DragController mDragController;
@@ -2408,7 +2396,6 @@
 
     public void onDragEnter(DragObject d) {
         mDragEnforcer.onDragEnter();
-        mDragHasEnteredWorkspace = true;
         mCreateUserFolderOnDrop = false;
         mAddToExistingFolderOnDrop = false;
 
@@ -2426,7 +2413,6 @@
 
     public void onDragExit(DragObject d) {
         mDragEnforcer.onDragExit();
-        mDragHasEnteredWorkspace = false;
 
         // Here we store the final page that will be dropped to, if the workspace in fact
         // receives the drop
@@ -2536,30 +2522,6 @@
         return null;
     }
 
-    /**
-     * Tests to see if the drop will be accepted by Launcher, and if so, includes additional data
-     * in the returned structure related to the widgets that match the drop (or a null list if it is
-     * a shortcut drop).  If the drop is not accepted then a null structure is returned.
-     */
-    private Pair<Integer, List<WidgetMimeTypeHandlerData>> validateDrag(DragEvent event) {
-        final LauncherModel model = mLauncher.getModel();
-        final ClipDescription desc = event.getClipDescription();
-        final int mimeTypeCount = desc.getMimeTypeCount();
-        for (int i = 0; i < mimeTypeCount; ++i) {
-            final String mimeType = desc.getMimeType(i);
-            if (mimeType.equals(InstallShortcutReceiver.SHORTCUT_MIMETYPE)) {
-                return new Pair<Integer, List<WidgetMimeTypeHandlerData>>(i, null);
-            } else {
-                final List<WidgetMimeTypeHandlerData> widgets =
-                    model.resolveWidgetsForMimeType(mContext, mimeType);
-                if (widgets.size() > 0) {
-                    return new Pair<Integer, List<WidgetMimeTypeHandlerData>>(i, widgets);
-                }
-            }
-        }
-        return null;
-    }
-
     /*
     *
     * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's