auto import from //depot/cupcake/@132589
diff --git a/src/com/android/launcher/LauncherModel.java b/src/com/android/launcher/LauncherModel.java
index 40b5402..783eef2 100644
--- a/src/com/android/launcher/LauncherModel.java
+++ b/src/com/android/launcher/LauncherModel.java
@@ -57,7 +57,6 @@
     private boolean mDesktopItemsLoaded;
 
     private ArrayList<ItemInfo> mDesktopItems;
-    private ArrayList<LauncherGadgetInfo> mDesktopGadgets;
     private HashMap<Long, FolderInfo> mFolders;
 
     private ArrayList<ApplicationInfo> mApplications;
@@ -203,7 +202,6 @@
             final ApplicationsAdapter applicationList = mApplicationList;
             final int count = buffer.size();
 
-            applicationList.setNotifyOnChange(false);
             applicationList.clear();
             for (int i = 0; i < count; i++) {
                 applicationList.setNotifyOnChange(false);
@@ -224,7 +222,7 @@
     }
 
     boolean isDesktopLoaded() {
-        return mDesktopItems != null && mDesktopGadgets != null && mDesktopItemsLoaded;
+        return mDesktopItems != null && mDesktopItemsLoaded;
     }
     
     /**
@@ -234,7 +232,7 @@
     void loadUserItems(boolean isLaunching, Launcher launcher, boolean localeChanged,
             boolean loadApplications) {
 
-        if (isLaunching && isDesktopLoaded()) {
+        if (isLaunching && mDesktopItems != null && mDesktopItemsLoaded) {
             if (loadApplications) startApplicationsLoader(launcher);
             // We have already loaded our data from the DB
             launcher.onDesktopItemsLoaded();
@@ -360,11 +358,9 @@
             }
 
             mDesktopItems = new ArrayList<ItemInfo>();
-            mDesktopGadgets = new ArrayList<LauncherGadgetInfo>();
             mFolders = new HashMap<Long, FolderInfo>();
 
             final ArrayList<ItemInfo> desktopItems = mDesktopItems;
-            final ArrayList<LauncherGadgetInfo> desktopGadgets = mDesktopGadgets;
 
             final Cursor c = contentResolver.query(
                     LauncherSettings.Favorites.CONTENT_URI, null, null, null, null);
@@ -390,8 +386,8 @@
 
                 ApplicationInfo info;
                 String intentDescription;
-                Widget widgetInfo;
-                LauncherGadgetInfo gadgetInfo;
+                Widget widgetInfo = null;
+                LauncherGadgetInfo gadgetInfo = null;
                 int container;
                 long id;
                 Intent intent;
@@ -540,7 +536,7 @@
                             }
                             gadgetInfo.container = c.getInt(containerIndex);
                             
-                            desktopGadgets.add(gadgetInfo);
+                            desktopItems.add(gadgetInfo);
                             break;
                         }
                     } catch (Exception e) {
@@ -647,7 +643,6 @@
         mApplicationsAdapter = null;
         unbindAppDrawables(mApplications);
         unbindDrawables(mDesktopItems);
-        unbindGadgetHostViews(mDesktopGadgets);
     }
     
     /**
@@ -663,7 +658,6 @@
                 case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
                 case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
                     ((ApplicationInfo)item).icon.setCallback(null);
-                    break;
                 }
             }
         }
@@ -683,19 +677,6 @@
     }
 
     /**
-     * Remove any {@link LauncherGadgetHostView} references in our gadgets.
-     */
-    private void unbindGadgetHostViews(ArrayList<LauncherGadgetInfo> gadgets) {
-        if (gadgets != null) {
-            final int count = gadgets.size();
-            for (int i = 0; i < count; i++) {
-                LauncherGadgetInfo launcherInfo = gadgets.get(i);
-                launcherInfo.hostView = null;
-            }
-        }
-    }
-
-    /**
      * @return The current list of applications
      */
     public ArrayList<ApplicationInfo> getApplications() {
@@ -715,13 +696,6 @@
     public ArrayList<ItemInfo> getDesktopItems() {
         return mDesktopItems;
     }
-    
-    /**
-     * @return The current list of desktop items
-     */
-    public ArrayList<LauncherGadgetInfo> getDesktopGadgets() {
-        return mDesktopGadgets;
-    }
 
     /**
      * Add an item to the desktop
@@ -742,20 +716,6 @@
     }
 
     /**
-     * Add a gadget to the desktop
-     */
-    public void addDesktopGadget(LauncherGadgetInfo info) {
-        mDesktopGadgets.add(info);
-    }
-    
-    /**
-     * Remove a gadget from the desktop
-     */
-    public void removeDesktopGadget(LauncherGadgetInfo info) {
-        mDesktopGadgets.remove(info);
-    }
-
-    /**
      * Make an ApplicationInfo object for an application
      */
     private static ApplicationInfo getApplicationInfo(PackageManager manager, Intent intent) {