auto import from //branches/cupcake/...@131421
diff --git a/src/com/android/launcher/LauncherGadgetHost.java b/src/com/android/launcher/LauncherGadgetHost.java
index 4f7e8f2..9bb4f05 100644
--- a/src/com/android/launcher/LauncherGadgetHost.java
+++ b/src/com/android/launcher/LauncherGadgetHost.java
@@ -19,113 +19,20 @@
 import android.content.Context;
 import android.gadget.GadgetHost;
 import android.gadget.GadgetHostView;
-import android.gadget.GadgetInfo;
-import android.graphics.Color;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewConfiguration;
-import android.widget.TextView;
+import android.gadget.GadgetProviderInfo;
 
 /**
- * Specific {@link GadgetHost} that creates our {@link LauncherGadgetHostView} which correctly
- * captures all long-press events.  This ensures that users can always pick up and move gadgets. 
+ * Specific {@link GadgetHost} that creates our {@link LauncherGadgetHostView}
+ * which correctly captures all long-press events. This ensures that users can
+ * always pick up and move gadgets.
  */
 public class LauncherGadgetHost extends GadgetHost {
     public LauncherGadgetHost(Context context, int hostId) {
         super(context, hostId);
     }
     
-    protected GadgetHostView onCreateView(Context context, int gadgetId, GadgetInfo gadget) {
+    protected GadgetHostView onCreateView(Context context, int gadgetId,
+            GadgetProviderInfo gadget) {
         return new LauncherGadgetHostView(context);
     }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public class LauncherGadgetHostView extends GadgetHostView {
-        static final String TAG = "LauncherGadgetHostView";
-
-        private boolean mHasPerformedLongPress;
-        
-        private CheckForLongPress mPendingCheckForLongPress;
-        
-        private LayoutInflater mInflater;
-        
-        public LauncherGadgetHostView(Context context) {
-            super(context);
-            
-            mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            
-            // Prepare our default transition animations
-            setAnimateFirstView(true);
-            setInAnimation(context, android.R.anim.fade_in);
-            setOutAnimation(context, android.R.anim.fade_out);
-        }
-        
-        @Override
-        protected View getErrorView() {
-            return mInflater.inflate(R.layout.gadget_error, this, false);
-        }
-
-        public boolean onInterceptTouchEvent(MotionEvent ev) {
-            
-            // Consume any touch events for ourselves after longpress is triggered
-            if (mHasPerformedLongPress) {
-                mHasPerformedLongPress = false;
-                return true;
-            }
-                
-            // Watch for longpress events at this level to make sure
-            // users can always pick up this Gadget
-            switch (ev.getAction()) {
-                case MotionEvent.ACTION_DOWN: {
-                    postCheckForLongClick();
-                    break;
-                }
-                
-                case MotionEvent.ACTION_UP: {
-                    mHasPerformedLongPress = false;
-                    if (mPendingCheckForLongPress != null) {
-                        removeCallbacks(mPendingCheckForLongPress);
-                    }
-                    break;
-                }
-            }
-            
-            // Otherwise continue letting touch events fall through to children
-            return false;
-        }
-        
-        class CheckForLongPress implements Runnable {
-            private int mOriginalWindowAttachCount;
-
-            public void run() {
-                if ((mParent != null) && hasWindowFocus()
-                        && mOriginalWindowAttachCount == getWindowAttachCount()
-                        && !mHasPerformedLongPress) {
-                    if (performLongClick()) {
-                        mHasPerformedLongPress = true;
-                    }
-                }
-            }
-
-            public void rememberWindowAttachCount() {
-                mOriginalWindowAttachCount = getWindowAttachCount();
-            }
-        }
-
-        private void postCheckForLongClick() {
-            mHasPerformedLongPress = false;
-
-            if (mPendingCheckForLongPress == null) {
-                mPendingCheckForLongPress = new CheckForLongPress();
-            }
-            mPendingCheckForLongPress.rememberWindowAttachCount();
-            postDelayed(mPendingCheckForLongPress, ViewConfiguration.getLongPressTimeout());
-        }
-
-    }
-
 }
-