Loading previews and holographic icons in background thread using AsyncTasks.

- Adding back animation between tabs

Change-Id: I1a49bfca4f85f579e232861aa02d08fb25d0aafc
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index 5c8812d..b3136e6 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -462,7 +462,6 @@
         mApps = list;
         Collections.sort(mApps, LauncherModel.APP_NAME_COMPARATOR);
         mFilteredApps = rebuildFilteredApps(mApps);
-        mPageViewIconCache.retainAllApps(list);
         invalidatePageData();
     }
 
@@ -509,7 +508,6 @@
             int removeIndex = findAppByComponent(mApps, info);
             if (removeIndex > -1) {
                 mApps.remove(removeIndex);
-                mPageViewIconCache.removeOutline(new PagedViewIconCache.Key(info));
             }
         }
         mFilteredApps = rebuildFilteredApps(mApps);
@@ -576,6 +574,7 @@
 
     @Override
     public void syncPages() {
+        /*
         // ensure that we have the right number of pages (min of 1, since we have placeholders)
         int numPages = Math.max(1,
                 (int) Math.ceil((float) mFilteredApps.size() / (mCellCountX * mCellCountY)));
@@ -597,10 +596,12 @@
 
         // bound the current page
         setCurrentPage(Math.max(0, Math.min(numPages - 1, getCurrentPage())));
+        */
     }
 
     @Override
     public void syncPageItems(int page) {
+        /*
         // Ensure that we have the right number of items on the pages
         final int numPages = getPageCount();
         final int cellsPerPage = mCellCountX * mCellCountY;
@@ -652,7 +653,7 @@
                 final ApplicationInfo info = mFilteredApps.get(i);
                 PagedViewIcon icon = (PagedViewIcon) layout.getChildOnPageAt(index);
                 icon.applyFromApplicationInfo(
-                        info, mPageViewIconCache, true, createHolographicOutlines);
+                        info, null, true, createHolographicOutlines);
 
                 PagedViewCellLayout.LayoutParams params =
                     (PagedViewCellLayout.LayoutParams) icon.getLayoutParams();
@@ -684,6 +685,7 @@
                     new PagedViewCellLayout.LayoutParams(0, 0, 4, 1));
         }
         layout.createHardwareLayers();
+        */
     }
 
     /*