Merge "Adding support to restore widgets even for jelly beans." into ub-now-porkchop
diff --git a/res/drawable-hdpi/quantum_panel.9.png b/res/drawable-hdpi/quantum_panel.9.png
index d86d7bc..a005e0b 100644
--- a/res/drawable-hdpi/quantum_panel.9.png
+++ b/res/drawable-hdpi/quantum_panel.9.png
Binary files differ
diff --git a/res/drawable-hdpi/quantum_panel_dark.9.png b/res/drawable-hdpi/quantum_panel_dark.9.png
new file mode 100644
index 0000000..057efd1
--- /dev/null
+++ b/res/drawable-hdpi/quantum_panel_dark.9.png
Binary files differ
diff --git a/res/drawable-mdpi/quantum_panel.9.png b/res/drawable-mdpi/quantum_panel.9.png
index 061c80a..785f573 100644
--- a/res/drawable-mdpi/quantum_panel.9.png
+++ b/res/drawable-mdpi/quantum_panel.9.png
Binary files differ
diff --git a/res/drawable-mdpi/quantum_panel_dark.9.png b/res/drawable-mdpi/quantum_panel_dark.9.png
new file mode 100644
index 0000000..7837e48
--- /dev/null
+++ b/res/drawable-mdpi/quantum_panel_dark.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quantum_panel.9.png b/res/drawable-xhdpi/quantum_panel.9.png
index 8605cfd..5726fd2 100644
--- a/res/drawable-xhdpi/quantum_panel.9.png
+++ b/res/drawable-xhdpi/quantum_panel.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quantum_panel_dark.9.png b/res/drawable-xhdpi/quantum_panel_dark.9.png
new file mode 100644
index 0000000..8944a8f
--- /dev/null
+++ b/res/drawable-xhdpi/quantum_panel_dark.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/quantum_panel.9.png b/res/drawable-xxhdpi/quantum_panel.9.png
index 9a1a79c..035cdc4 100644
--- a/res/drawable-xxhdpi/quantum_panel.9.png
+++ b/res/drawable-xxhdpi/quantum_panel.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/quantum_panel_dark.9.png b/res/drawable-xxhdpi/quantum_panel_dark.9.png
new file mode 100644
index 0000000..b74f1a6
--- /dev/null
+++ b/res/drawable-xxhdpi/quantum_panel_dark.9.png
Binary files differ
diff --git a/res/layout/apps_customize_pane.xml b/res/layout/apps_customize_pane.xml
index 007c536..03e433a 100644
--- a/res/layout/apps_customize_pane.xml
+++ b/res/layout/apps_customize_pane.xml
@@ -24,17 +24,30 @@
         android:clipChildren="false"
         android:orientation="vertical">
 
-        <com.android.launcher3.AppsCustomizePagedView
-            android:id="@+id/apps_customize_pane_content"
+        <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="0dp"
-            android:layout_weight="1"
-            launcher:widgetCountX="@integer/apps_customize_widget_cell_count_x"
-            launcher:widgetCountY="@integer/apps_customize_widget_cell_count_y"
-            launcher:clingFocusedX="@integer/apps_customize_cling_focused_x"
-            launcher:clingFocusedY="@integer/apps_customize_cling_focused_y"
-            launcher:maxGap="@dimen/workspace_max_gap"
-            launcher:pageIndicator="@+id/apps_customize_page_indicator" />
+            android:layout_weight="1">
+            <FrameLayout
+                android:id="@+id/fake_page_container"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" >
+                <FrameLayout
+                android:id="@+id/fake_page"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
+            </FrameLayout>
+            <com.android.launcher3.AppsCustomizePagedView
+                android:id="@+id/apps_customize_pane_content"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                launcher:widgetCountX="@integer/apps_customize_widget_cell_count_x"
+                launcher:widgetCountY="@integer/apps_customize_widget_cell_count_y"
+                launcher:clingFocusedX="@integer/apps_customize_cling_focused_x"
+                launcher:clingFocusedY="@integer/apps_customize_cling_focused_y"
+                launcher:maxGap="@dimen/workspace_max_gap"
+                launcher:pageIndicator="@+id/apps_customize_page_indicator" />
+        </FrameLayout>
         <include
             android:id="@+id/apps_customize_page_indicator"
             layout="@layout/page_indicator"
diff --git a/res/layout/apps_customize_widget.xml b/res/layout/apps_customize_widget.xml
index 7c98b4a..e299b32 100644
--- a/res/layout/apps_customize_widget.xml
+++ b/res/layout/apps_customize_widget.xml
@@ -25,24 +25,45 @@
     android:background="@drawable/focusable_view_bg"
     android:focusable="true">
 
-    <!-- The preview of the widget or shortcut. -->
-    <com.android.launcher3.PagedViewWidgetImageView
-        android:id="@+id/widget_preview"
-        style="@style/PagedViewWidgetImageView"
+    <LinearLayout
+        android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:paddingTop="@dimen/app_widget_preview_padding_top"
-        android:paddingEnd="@dimen/app_widget_preview_padding_right"
-        android:paddingRight="@dimen/app_widget_preview_padding_right"
-        android:scaleType="matrix"
-        android:background="@drawable/screenpanel" />
+        android:layout_weight="1">
+        <FrameLayout
+            android:id="@+id/left_border"
+            android:layout_width="1dp"
+            android:layout_height="match_parent"
+            android:background="@color/widget_text_panel"
+            android:visibility="gone" />
+
+        <!-- The preview of the widget or shortcut. -->
+        <com.android.launcher3.PagedViewWidgetImageView
+            android:id="@+id/widget_preview"
+            style="@style/PagedViewWidgetImageView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:paddingTop="@dimen/app_widget_preview_padding_top"
+            android:paddingEnd="@dimen/app_widget_preview_padding_right"
+            android:paddingRight="@dimen/app_widget_preview_padding_right"
+            android:scaleType="matrix" />
+        <FrameLayout
+            android:id="@+id/right_border"
+            android:layout_width="1dp"
+            android:layout_height="match_parent"
+            android:background="@color/widget_text_panel"
+            android:visibility="gone" />
+    </LinearLayout>
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/app_widget_preview_label_margin_top"
-        android:layout_marginStart="@dimen/app_widget_preview_label_margin_left"
-        android:layout_marginEnd="@dimen/app_widget_preview_label_margin_right"
+        android:paddingTop="@dimen/app_widget_preview_label_vertical_padding"
+        android:paddingBottom="@dimen/app_widget_preview_label_vertical_padding"
+        android:paddingLeft="@dimen/app_widget_preview_label_horizontal_padding"
+        android:paddingRight="@dimen/app_widget_preview_label_horizontal_padding"
+        android:background="@color/widget_text_panel"
         android:orientation="horizontal">
         <!-- The name of the widget. -->
         <TextView xmlns:android="http://schemas.android.com/apk/res/android"
@@ -56,7 +77,7 @@
             android:fadingEdge="horizontal"
 
             android:textColor="#FFFFFFFF"
-            android:textSize="13sp"
+            android:textSize="12sp"
             android:textAlignment="viewStart"
             android:fontFamily="sans-serif-condensed"
             android:shadowRadius="2.0"
@@ -73,7 +94,7 @@
             android:layout_weight="0"
             android:gravity="start"
 
-            android:textColor="#FFAAAAAA"
+            android:textColor="#FFFFFFFF"
             android:textSize="12sp"
             android:fontFamily="sans-serif-condensed"
             android:shadowRadius="2.0"
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index f3bfcec..12fa3cd 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -98,11 +98,6 @@
         <!-- A spacing override for the icons within a page -->
         <attr name="pageLayoutWidthGap" format="dimension" />
         <attr name="pageLayoutHeightGap" format="dimension" />
-        <!-- The padding of the pages that are dynamically created per page -->
-        <attr name="pageLayoutPaddingTop" format="dimension" />
-        <attr name="pageLayoutPaddingBottom" format="dimension" />
-        <attr name="pageLayoutPaddingLeft" format="dimension" />
-        <attr name="pageLayoutPaddingRight" format="dimension" />
 
         <!-- The page indicator for this workspace -->
         <attr name="pageIndicator" format="reference" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 27a5b61..41f3892 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -36,6 +36,7 @@
     <color name="quantum_panel_text_shadow_color">#FFC4C4C4</color>
     <color name="folder_items_glow_color">#FFCCCCCC</color>
     <color name="outline_color">#FFFFFFFF</color>
-    
+    <color name="widget_text_panel">#FF374248</color>
+
     <color name="first_run_cling_circle_background_color">#64b1ea</color>
 </resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 3a862c5..a16f265 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -31,7 +31,8 @@
 
     <!-- Fade/zoom in/out duration & scale in the AllApps transition.
          Note: This should be less than the workspaceShrinkTime as they happen together. -->
-    <integer name="config_appsCustomizeRevealTime">350</integer>
+    <integer name="config_appsCustomizeRevealTime">220</integer>
+    <integer name="config_appsCustomizeItemsAlphaStagger">60</integer>
     <integer name="config_appsCustomizeZoomInTime">350</integer>
     <integer name="config_appsCustomizeZoomOutTime">600</integer>
     <integer name="config_appsCustomizeZoomScaleFactor">7</integer>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 8e561cf..893d7c0 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -62,7 +62,7 @@
     <dimen name="apps_customize_tab_bar_height">52dp</dimen>
     <dimen name="apps_customize_tab_bar_margin_top">0dp</dimen>
     <dimen name="app_icon_size">48dp</dimen>
-    <dimen name="apps_customize_horizontal_padding">4dp</dimen>
+    <dimen name="apps_customize_horizontal_padding">0dp</dimen>
 
     <!-- The AppsCustomize page indicator -->
     <dimen name="apps_customize_page_indicator_height">12dp</dimen>
@@ -89,9 +89,8 @@
     <dimen name="app_widget_preview_padding_left">16dp</dimen>
     <dimen name="app_widget_preview_padding_right">16dp</dimen>
     <dimen name="app_widget_preview_padding_top">32dp</dimen>
-    <dimen name="app_widget_preview_label_margin_top">4dp</dimen>
-    <dimen name="app_widget_preview_label_margin_left">2dp</dimen>
-    <dimen name="app_widget_preview_label_margin_right">2dp</dimen>
+    <dimen name="app_widget_preview_label_vertical_padding">8dp</dimen>
+    <dimen name="app_widget_preview_label_horizontal_padding">8dp</dimen>
 
     <!-- Padding applied to shortcut previews -->
     <dimen name="shortcut_preview_padding_left">0dp</dimen>
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 5f2a366..b98a391 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -185,7 +185,6 @@
     // Dimens
     private int mContentWidth, mContentHeight;
     private int mWidgetCountX, mWidgetCountY;
-    private int mWidgetWidthGap, mWidgetHeightGap;
     private PagedViewCellLayout mWidgetSpacingLayout;
     private int mNumAppsPages;
     private int mNumWidgetPages;
@@ -197,7 +196,7 @@
     private static float TRANSITION_SCALE_FACTOR = 0.74f;
     private static float TRANSITION_PIVOT = 0.65f;
     private static float TRANSITION_MAX_ROTATION = 22;
-    private static final boolean PERFORM_OVERSCROLL_ROTATION = true;
+    private static final boolean PERFORM_OVERSCROLL_ROTATION = false;
     private AccelerateInterpolator mAlphaInterpolator = new AccelerateInterpolator(0.9f);
     private DecelerateInterpolator mLeftScreenAlphaInterpolator = new DecelerateInterpolator(4);
 
@@ -215,6 +214,7 @@
     int mWidgetLoadingId = -1;
     PendingAddWidgetInfo mCreateWidgetInfo = null;
     private boolean mDraggingWidget = false;
+    boolean mPageBackgroundsVisible;
 
     private Toast mWidgetInstructionToast;
 
@@ -244,7 +244,6 @@
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AppsCustomizePagedView, 0, 0);
         LauncherAppState app = LauncherAppState.getInstance();
         DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-        mWidgetWidthGap = mWidgetHeightGap = grid.edgeMarginPx;
         mWidgetCountX = a.getInt(R.styleable.AppsCustomizePagedView_widgetCountX, 2);
         mWidgetCountY = a.getInt(R.styleable.AppsCustomizePagedView_widgetCountY, 2);
         mClingFocusedX = a.getInt(R.styleable.AppsCustomizePagedView_clingFocusedX, 0);
@@ -284,8 +283,9 @@
     void setAllAppsPadding(Rect r) {
         mAllAppsPadding.set(r);
     }
+
     void setWidgetsPageIndicatorPadding(int pageIndicatorHeight) {
-        mPageLayoutPaddingBottom = pageIndicatorHeight;
+        setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), pageIndicatorHeight);
     }
 
     WidgetPreviewLoader getWidgetPreviewLoader() {
@@ -364,8 +364,6 @@
         // use for each page
         LauncherAppState app = LauncherAppState.getInstance();
         DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-        mWidgetSpacingLayout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop,
-                mPageLayoutPaddingRight, mPageLayoutPaddingBottom);
         mCellCountX = (int) grid.allAppsNumCols;
         mCellCountY = (int) grid.allAppsNumRows;
         updatePageCounts();
@@ -1001,14 +999,26 @@
         setVisibilityOnChildren(layout, View.GONE);
         int widthSpec = MeasureSpec.makeMeasureSpec(mContentWidth, MeasureSpec.AT_MOST);
         int heightSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.AT_MOST);
-        layout.setMinimumWidth(getPageContentWidth());
         layout.measure(widthSpec, heightSpec);
-        layout.setPadding(mAllAppsPadding.left, mAllAppsPadding.top, mAllAppsPadding.right,
-                mAllAppsPadding.bottom);
-        setVisibilityOnChildren(layout, View.VISIBLE);
 
-        Resources res = getContext().getResources();
-        layout.setBackground(res.getDrawable(R.drawable.quantum_panel));
+        Drawable bg = getContext().getDrawable(R.drawable.quantum_panel);
+        if (bg != null) {
+            layout.setBackground(bg);
+            bg.setVisible(mPageBackgroundsVisible, false);
+        }
+
+        setVisibilityOnChildren(layout, View.VISIBLE);
+    }
+
+    public void setPageBackgroundsVisible(boolean visible) {
+        mPageBackgroundsVisible = visible;
+        int childCount = getChildCount();
+        for (int i = 0; i < childCount; ++i) {
+            Drawable bg = getChildAt(i).getBackground();
+            if (bg != null) {
+                bg.setVisible(visible, false);
+            }
+        }
     }
 
     public void syncAppsPageItems(int page, boolean immediate) {
@@ -1153,21 +1163,23 @@
         // immediately after syncing, we don't have a proper width.
         int widthSpec = MeasureSpec.makeMeasureSpec(mContentWidth, MeasureSpec.AT_MOST);
         int heightSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.AT_MOST);
-        layout.setMinimumWidth(getPageContentWidth());
+        layout.setBackground(getContext().getDrawable(R.drawable.quantum_panel_dark));
         layout.measure(widthSpec, heightSpec);
     }
 
     public void syncWidgetPageItems(final int page, final boolean immediate) {
         int numItemsPerPage = mWidgetCountX * mWidgetCountY;
 
+        final PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
+
         // Calculate the dimensions of each cell we are giving to each widget
         final ArrayList<Object> items = new ArrayList<Object>();
-        int contentWidth = mContentWidth;
-        final int cellWidth = ((contentWidth - mPageLayoutPaddingLeft - mPageLayoutPaddingRight
-                - ((mWidgetCountX - 1) * mWidgetWidthGap)) / mWidgetCountX);
-        int contentHeight = mContentHeight;
-        final int cellHeight = ((contentHeight - mPageLayoutPaddingTop - mPageLayoutPaddingBottom
-                - ((mWidgetCountY - 1) * mWidgetHeightGap)) / mWidgetCountY);
+        int contentWidth = mContentWidth - getPaddingLeft() - getPaddingRight()
+                - layout.getPaddingLeft() - layout.getPaddingRight();
+        final int cellWidth = contentWidth / mWidgetCountX;
+        int contentHeight = mContentHeight - getPaddingTop() - getPaddingBottom()
+                - layout.getPaddingTop() - layout.getPaddingBottom();
+        final int cellHeight = contentHeight / mWidgetCountY;
 
         // Prepare the set of widgets to load previews for in the background
         int offset = page * numItemsPerPage;
@@ -1176,7 +1188,6 @@
         }
 
         // Prepopulate the pages with the other widget info, and fill in the previews later
-        final PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
         layout.setColumnCount(layout.getCellCountX());
         for (int i = 0; i < items.size(); ++i) {
             Object rawInfo = items.get(i);
@@ -1217,14 +1228,22 @@
             // Layout each widget
             int ix = i % mWidgetCountX;
             int iy = i / mWidgetCountX;
+
+            if (ix > 0) {
+                View border = widget.findViewById(R.id.left_border);
+                border.setVisibility(View.VISIBLE);
+            }
+            if (ix < mWidgetCountX - 1) {
+                View border = widget.findViewById(R.id.right_border);
+                border.setVisibility(View.VISIBLE);
+            }
+
             GridLayout.LayoutParams lp = new GridLayout.LayoutParams(
                     GridLayout.spec(iy, GridLayout.START),
                     GridLayout.spec(ix, GridLayout.TOP));
             lp.width = cellWidth;
             lp.height = cellHeight;
             lp.setGravity(Gravity.TOP | Gravity.START);
-            if (ix > 0) lp.leftMargin = mWidgetWidthGap;
-            if (iy > 0) lp.topMargin = mWidgetHeightGap;
             layout.addView(widget, lp);
         }
 
@@ -1438,24 +1457,6 @@
                         v.setRotationY(0f);
                     }
                 }
-
-                // TODO: clean this up
-                alpha = 1;
-                translationX = 0;
-                scale = 1;
-
-                v.setTranslationX(translationX);
-                v.setScaleX(scale);
-                v.setScaleY(scale);
-                v.setAlpha(alpha);
-
-                // If the view has 0 alpha, we set it to be invisible so as to prevent
-                // it from accepting touches
-                if (alpha == 0) {
-                    v.setVisibility(INVISIBLE);
-                } else if (v.getVisibility() != VISIBLE) {
-                    v.setVisibility(VISIBLE);
-                }
             }
         }
 
diff --git a/src/com/android/launcher3/AppsCustomizeTabHost.java b/src/com/android/launcher3/AppsCustomizeTabHost.java
index 283f4ed..629bcdb 100644
--- a/src/com/android/launcher3/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher3/AppsCustomizeTabHost.java
@@ -181,9 +181,6 @@
     @Override
     public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
         mPagedView.onLauncherTransitionStart(l, animated, toWorkspace);
-        if (animated && !Utilities.isLmp()) {
-            enableAndBuildHardwareLayer();
-        }
     }
 
     @Override
@@ -195,9 +192,6 @@
     public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) {
         mPagedView.onLauncherTransitionEnd(l, animated, toWorkspace);
         mInTransition = false;
-        if (animated && !Utilities.isLmp()) {
-            setLayerType(LAYER_TYPE_NONE, null);
-        }
 
         if (!toWorkspace) {
             // Make sure adjacent pages are loaded (we wait until after the transition to
@@ -241,20 +235,4 @@
             throw new RuntimeException("Failed; can't get z-order of views");
         }
     }
-
-    private void enableAndBuildHardwareLayer() {
-        // isHardwareAccelerated() checks if we're attached to a window and if that
-        // window is HW accelerated-- we were sometimes not attached to a window
-        // and buildLayer was throwing an IllegalStateException
-        if (isHardwareAccelerated()) {
-            // Turn on hardware layers for performance
-            setLayerType(LAYER_TYPE_HARDWARE, null);
-
-            // force building the layer, so you don't get a blip early in an animation
-            // when the layer is created layer
-            buildLayer();
-        }
-    }
-
-
 }
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c0f5054..018fcfc 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -775,6 +775,11 @@
 
             AppsCustomizePagedView pagedView = (AppsCustomizePagedView)
                     host.findViewById(R.id.apps_customize_pane_content);
+
+            FrameLayout fakePageContainer = (FrameLayout)
+                    host.findViewById(R.id.fake_page_container);
+            FrameLayout fakePage = (FrameLayout) host.findViewById(R.id.fake_page);
+
             padding = new Rect();
             if (pagedView != null) {
                 // Constrain the dimensions of all apps so that it does not span the full width
@@ -790,16 +795,24 @@
                 if ((isTablet() || isLandscape) && gridPaddingLR > (allAppsCellWidthPx / 4)) {
                     padding.left = padding.right = gridPaddingLR;
                 }
+
                 // The icons are centered, so we can't just offset by the page indicator height
                 // because the empty space will actually be pageIndicatorHeight + paddingTB
                 padding.bottom = Math.max(0, pageIndicatorHeight - paddingTB);
-                pagedView.setAllAppsPadding(padding);
+
                 pagedView.setWidgetsPageIndicatorPadding(pageIndicatorHeight);
+                fakePage.setBackground(res.getDrawable(R.drawable.quantum_panel));
 
                 // Horizontal padding for the whole paged view
-                int pagedViewPadding =
+                int pagedFixedViewPadding =
                         res.getDimensionPixelSize(R.dimen.apps_customize_horizontal_padding);
-                pagedView.setPadding(pagedViewPadding, 0, pagedViewPadding, 0);
+
+                padding.left += pagedFixedViewPadding;
+                padding.right += pagedFixedViewPadding;
+
+                pagedView.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+                fakePageContainer.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+
             }
         }
 
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 111fba8..5eedc8a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -91,7 +91,9 @@
 import android.view.WindowManager;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.animation.AccelerateDecelerateInterpolator;
+import android.view.animation.AccelerateInterpolator;
 import android.view.animation.DecelerateInterpolator;
+import android.view.animation.LinearInterpolator;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.Advanceable;
 import android.widget.FrameLayout;
@@ -3108,16 +3110,6 @@
         return (mState == State.APPS_CUSTOMIZE) || (mOnResumeState == State.APPS_CUSTOMIZE);
     }
 
-    /**
-     * Helper method for the cameraZoomIn/cameraZoomOut animations
-     * @param view The view being animated
-     * @param scaleFactor The scale factor used for the zoom
-     */
-    private void setPivotsForZoom(View view, float scaleFactor) {
-        view.setPivotX(view.getWidth() / 2.0f);
-        view.setPivotY(view.getHeight() / 2.0f);
-    }
-
     private void setWorkspaceBackground(boolean workspace) {
         mLauncherView.setBackground(workspace ?
                 mWorkspaceBackgroundDrawable : null);
@@ -3228,6 +3220,8 @@
         final int duration = res.getInteger(R.integer.config_appsCustomizeZoomInTime);
         final int fadeDuration = res.getInteger(R.integer.config_appsCustomizeFadeInTime);
         final int revealDuration = res.getInteger(R.integer.config_appsCustomizeRevealTime);
+        final int itemsAlphaStagger =
+                res.getInteger(R.integer.config_appsCustomizeItemsAlphaStagger);
 
         final float scale = (float) res.getInteger(R.integer.config_appsCustomizeZoomScaleFactor);
         final View fromView = mWorkspace;
@@ -3235,8 +3229,6 @@
         final int startDelay =
                 res.getInteger(R.integer.config_workspaceAppsCustomizeAnimationStagger);
 
-        setPivotsForZoom(toView, scale);
-
         Workspace.State workspaceState = contentType == AppsCustomizePagedView.ContentType.Widgets ?
                 Workspace.State.OVERVIEW_HIDDEN : Workspace.State.NORMAL_HIDDEN;
         Animator workspaceAnim =
@@ -3248,147 +3240,104 @@
         }
 
         if (animated) {
-            if (!material) {
-                toView.setScaleX(scale);
-                toView.setScaleY(scale);
-                final LauncherViewPropertyAnimator scaleAnim =
-                        new LauncherViewPropertyAnimator(toView);
-                scaleAnim.
-                    scaleX(1f).scaleY(1f).
-                    setDuration(duration).
-                    setInterpolator(new Workspace.ZoomOutInterpolator());
+            mStateAnimation = LauncherAnimUtils.createAnimatorSet();
 
-                toView.setVisibility(View.VISIBLE);
-                toView.setAlpha(0f);
-                final ObjectAnimator alphaAnim = LauncherAnimUtils
-                    .ofFloat(toView, "alpha", 0f, 1f)
-                    .setDuration(fadeDuration);
-                alphaAnim.setInterpolator(new DecelerateInterpolator(1.5f));
-                alphaAnim.addUpdateListener(new AnimatorUpdateListener() {
-                    @Override
-                    public void onAnimationUpdate(ValueAnimator animation) {
-                        if (animation == null) {
-                            throw new RuntimeException("animation is null");
-                        }
-                        float t = (Float) animation.getAnimatedValue();
-                        dispatchOnLauncherTransitionStep(fromView, t);
-                        dispatchOnLauncherTransitionStep(toView, t);
-                    }
-                });
+            final AppsCustomizePagedView content = (AppsCustomizePagedView)
+                    toView.findViewById(R.id.apps_customize_pane_content);
 
-                // toView should appear right at the end of the workspace shrink
-                // animation
-                mStateAnimation = LauncherAnimUtils.createAnimatorSet();
-                mStateAnimation.play(scaleAnim).after(startDelay);
-                mStateAnimation.play(alphaAnim).after(startDelay);
+            final View page = content.getPageAt(content.getCurrentPage());
+            final View revealView = toView.findViewById(R.id.fake_page);
 
-                mStateAnimation.addListener(new AnimatorListenerAdapter() {
-                    @Override
-                    public void onAnimationStart(Animator animation) {
-                        // Prepare the position
-                        toView.setTranslationX(0.0f);
-                        toView.setTranslationY(0.0f);
-                        toView.setVisibility(View.VISIBLE);
-                        toView.bringToFront();
-                    }
-                    @Override
-                    public void onAnimationEnd(Animator animation) {
-                        dispatchOnLauncherTransitionEnd(fromView, animated, false);
-                        dispatchOnLauncherTransitionEnd(toView, animated, false);
-
-                        // Hide the search bar
-                        if (mSearchDropTargetBar != null) {
-                            mSearchDropTargetBar.hideSearchBar(false);
-                        }
-                    }
-                });
+            if (contentType == AppsCustomizePagedView.ContentType.Widgets) {
+                revealView.setBackground(res.getDrawable(R.drawable.quantum_panel_dark));
             } else {
-                int width = toView.getMeasuredWidth();
-                int height = toView.getMeasuredHeight();
-                float revealRadius = (float) Math.sqrt((width * width) / 4 + height * height);
+                revealView.setBackground(res.getDrawable(R.drawable.quantum_panel));
+            }
 
-                mStateAnimation = LauncherAnimUtils.createAnimatorSet();
+            // Hide the real page background, and swap in the fake one
+            revealView.setVisibility(View.VISIBLE);
+            content.setPageBackgroundsVisible(false);
 
-                AppsCustomizePagedView content = (AppsCustomizePagedView)
-                        toView.findViewById(R.id.apps_customize_pane_content);
+            int width = revealView.getMeasuredWidth();
+            int height = revealView.getMeasuredHeight();
 
-                View page = content.getPageAt(content.getCurrentPage());
-                View revealView = content;
+            float revealRadius = (float) Math.sqrt((width * width) / 4 + (height * height) / 4);
+            float yDrift = height / 2f;
 
-                float yDrift = height / 2f - 400;
+            revealView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+            PropertyValuesHolder panelAlpha = PropertyValuesHolder.ofFloat("alpha", 0.4f, 1f);
+            PropertyValuesHolder panelDrift =
+                    PropertyValuesHolder.ofFloat("translationY", yDrift, 0f);
 
-                LauncherViewPropertyAnimator panelAlphaAndDrift =
-                        new LauncherViewPropertyAnimator(revealView);
-                revealView.setTranslationY(yDrift);
-                revealView.setAlpha(0.3f);
-                panelAlphaAndDrift.alpha(1)
-                    .translationY(0)
-                    .setDuration(revealDuration)
-                    .setInterpolator(new LogDecelerateInterpolator(100, 0));
+            ObjectAnimator panelAlphaAndDrift =
+                    ObjectAnimator.ofPropertyValuesHolder(revealView, panelAlpha, panelDrift);
+            panelAlphaAndDrift.setDuration(revealDuration);
+            panelAlphaAndDrift.setInterpolator(new LogDecelerateInterpolator(100, 0));
 
-                mStateAnimation.play(panelAlphaAndDrift);
+            mStateAnimation.play(panelAlphaAndDrift);
 
-                if (page instanceof CellLayout) {
-                    CellLayout cellLayout = (CellLayout) page;
-                    cellLayout.enableHardwareLayer(true);
+            if (page != null) {
+                page.setVisibility(View.VISIBLE);
+                page.setLayerType(View.LAYER_TYPE_HARDWARE, null);
 
-                    View iconsView = cellLayout.getShortcutsAndWidgets();
-                    iconsView.setAlpha(0f);
+                ObjectAnimator pageDrift = ObjectAnimator.ofFloat(page, "translationY", yDrift, 0);
+                pageDrift.setDuration(revealDuration);
+                pageDrift.setInterpolator(new LogDecelerateInterpolator(100, 0));
+                mStateAnimation.play(pageDrift);
 
-                    LauncherViewPropertyAnimator iconsAlpha =
-                            new LauncherViewPropertyAnimator(iconsView);
-                    iconsAlpha.alpha(1f)
-                        .setDuration(revealDuration - 100)
-                        .setInterpolator(new LogDecelerateInterpolator(100, 0));
-                    mStateAnimation.play(iconsAlpha);
-                }
+                // TODO (adamcohen): remove this 0.01f hack once fw is fixed
+                // it's there to work around a framework bug (16918357)
+                page.setAlpha(0.01f);
+                ObjectAnimator itemsAlpha = ObjectAnimator.ofFloat(page, "alpha", 0.01f, 1f);
+                itemsAlpha.setDuration(revealDuration);
+                itemsAlpha.setInterpolator(new AccelerateInterpolator(1.5f));
+                itemsAlpha.setStartDelay(itemsAlphaStagger);
+                mStateAnimation.play(itemsAlpha);
+            }
 
-                View pageIndicators = toView.findViewById(R.id.apps_customize_page_indicator);
-                pageIndicators.setAlpha(0f);
-                final LauncherViewPropertyAnimator indicatorsAlpha =
-                        new LauncherViewPropertyAnimator(pageIndicators);
-                indicatorsAlpha.alpha(1f);
-                indicatorsAlpha.setDuration(revealDuration);
-                mStateAnimation.play(indicatorsAlpha);
+            View pageIndicators = toView.findViewById(R.id.apps_customize_page_indicator);
+            pageIndicators.setAlpha(0.01f);
+            ObjectAnimator indicatorsAlpha =
+                    ObjectAnimator.ofFloat(pageIndicators, "alpha", 1f);
+            indicatorsAlpha.setDuration(revealDuration);
+            mStateAnimation.play(indicatorsAlpha);
 
-                width = revealView.getMeasuredWidth();
-
-                Animator reveal =
+            if (material) {
+                ValueAnimator reveal = (ValueAnimator)
                         ViewAnimationUtils.createCircularReveal(revealView, width / 2,
-                                height / 2 + 100, 0f, revealRadius);
+                                height / 2, 0f, revealRadius);
                 reveal.setDuration(revealDuration);
                 reveal.setInterpolator(new LogDecelerateInterpolator(100, 0));
-
-                toView.setTranslationX(0);
-                toView.setTranslationY(0);
-                toView.setAlpha(1f);
-                // toView should appear right at the end of the workspace shrink
-                // animation
                 mStateAnimation.play(reveal);
-
-                reveal.addListener(new AnimatorListenerAdapter() {
-                    @Override
-                    public void onAnimationStart(Animator animation) {
-                        // Prepare the position
-                        toView.bringToFront();
-                        toView.setVisibility(View.VISIBLE);
-                    }
-                });
-
-                mStateAnimation.addListener(new AnimatorListenerAdapter() {
-                    @Override
-                    public void onAnimationEnd(Animator animation) {
-                        dispatchOnLauncherTransitionEnd(fromView, animated, false);
-                        dispatchOnLauncherTransitionEnd(toView, animated, false);
-
-                        // Hide the search bar
-                        if (mSearchDropTargetBar != null) {
-                            mSearchDropTargetBar.hideSearchBar(false);
-                        }
-                    }
-                });
             }
 
+            mStateAnimation.addListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    dispatchOnLauncherTransitionEnd(fromView, animated, false);
+                    dispatchOnLauncherTransitionEnd(toView, animated, false);
+
+                    revealView.setVisibility(View.INVISIBLE);
+                    revealView.setLayerType(View.LAYER_TYPE_NONE, null);
+                    if (page != null) {
+                        page.setLayerType(View.LAYER_TYPE_NONE, null);
+                    }
+                    content.setPageBackgroundsVisible(true);
+
+                    // Hide the search bar
+                    if (mSearchDropTargetBar != null) {
+                        mSearchDropTargetBar.hideSearchBar(false);
+                    }
+                }
+
+                @Override
+                public void onAnimationStart(Animator animation) {
+                    // Prepare the position
+                    toView.bringToFront();
+                    toView.setVisibility(View.VISIBLE);
+                }
+            });
+
             boolean delayAnim = false;
             if (workspaceAnim != null) {
                 mStateAnimation.play(workspaceAnim);
@@ -3411,13 +3360,14 @@
                     // we waited for a layout/draw pass
                     if (mStateAnimation != stateAnimation)
                         return;
-                    setPivotsForZoom(toView, scale);
                     dispatchOnLauncherTransitionStart(fromView, animated, false);
                     dispatchOnLauncherTransitionStart(toView, animated, false);
                     LauncherAnimUtils.startAnimationAfterNextDraw(mStateAnimation, toView);
                 }
             };
             if (delayAnim) {
+                toView.bringToFront();
+                toView.setVisibility(View.VISIBLE);
                 final ViewTreeObserver observer = toView.getViewTreeObserver();
                 observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
                         public void onGlobalLayout() {
@@ -3472,6 +3422,8 @@
         final int duration = res.getInteger(R.integer.config_appsCustomizeZoomOutTime);
         final int fadeOutDuration = res.getInteger(R.integer.config_appsCustomizeFadeOutTime);
         final int revealDuration = res.getInteger(R.integer.config_appsCustomizeRevealTime);
+        final int itemsAlphaStagger =
+                res.getInteger(R.integer.config_appsCustomizeItemsAlphaStagger);
 
         final float scaleFactor = (float)
                 res.getInteger(R.integer.config_appsCustomizeZoomScaleFactor);
@@ -3488,116 +3440,94 @@
                     toState, animated);
         }
 
-        setPivotsForZoom(fromView, scaleFactor);
         showHotseat(animated);
         if (animated) {
-            if (!material) {
-                final LauncherViewPropertyAnimator scaleAnim =
-                        new LauncherViewPropertyAnimator(fromView);
-                scaleAnim.
-                    scaleX(scaleFactor).scaleY(scaleFactor).
-                    setDuration(duration).
-                    setInterpolator(new Workspace.ZoomInInterpolator());
+            mStateAnimation = LauncherAnimUtils.createAnimatorSet();
 
-                final ObjectAnimator alphaAnim = LauncherAnimUtils
-                    .ofFloat(fromView, "alpha", 1f, 0f)
-                    .setDuration(fadeOutDuration);
-                alphaAnim.setInterpolator(new AccelerateDecelerateInterpolator());
-                alphaAnim.addUpdateListener(new AnimatorUpdateListener() {
-                    @Override
-                    public void onAnimationUpdate(ValueAnimator animation) {
-                        float t = 1f - (Float) animation.getAnimatedValue();
-                        dispatchOnLauncherTransitionStep(fromView, t);
-                        dispatchOnLauncherTransitionStep(toView, t);
-                    }
-                });
+            final AppsCustomizePagedView content = (AppsCustomizePagedView)
+                    fromView.findViewById(R.id.apps_customize_pane_content);
 
-                mStateAnimation = LauncherAnimUtils.createAnimatorSet();
+            final View page = content.getPageAt(content.getNextPage());
+            final View revealView = fromView.findViewById(R.id.fake_page);
 
-                dispatchOnLauncherTransitionPrepare(fromView, animated, true);
-                dispatchOnLauncherTransitionPrepare(toView, animated, true);
-                mAppsCustomizeContent.stopScrolling();
-
-                mStateAnimation.playTogether(scaleAnim, alphaAnim);
+            AppsCustomizePagedView.ContentType contentType = content.getContentType();
+            if (contentType == AppsCustomizePagedView.ContentType.Widgets) {
+                revealView.setBackground(res.getDrawable(R.drawable.quantum_panel_dark));
             } else {
-                mStateAnimation = LauncherAnimUtils.createAnimatorSet();
+                revealView.setBackground(res.getDrawable(R.drawable.quantum_panel));
+            }
 
-                int width = fromView.getMeasuredWidth();
-                int height = fromView.getMeasuredHeight();
-                float revealRadius = (float) Math.sqrt((width * width) / 4 + height * height);
+            int width = revealView.getMeasuredWidth();
+            int height = revealView.getMeasuredHeight();
+            float revealRadius = (float) Math.sqrt((width * width) / 4 + (height * height) / 4);
 
-                AppsCustomizePagedView content = (AppsCustomizePagedView)
-                        fromView.findViewById(R.id.apps_customize_pane_content);
+            // Hide the real page background, and swap in the fake one
+            revealView.setVisibility(View.VISIBLE);
+            content.setPageBackgroundsVisible(false);
 
-                final View page = content.getPageAt(content.getNextPage());
-                View revealView = page;
+            float yDrift = height / 2f;
 
-                float yDrift = height / 2f - 400;
+            revealView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
 
-                LauncherViewPropertyAnimator panelAlphaAndDrift =
-                        new LauncherViewPropertyAnimator(revealView);
-                revealView.setTranslationY(0);
-                revealView.setAlpha(1);
-                panelAlphaAndDrift.alpha(0)
-                    .translationY(yDrift)
-                    .setDuration(revealDuration)
-                    .setInterpolator(new LogDecelerateInterpolator(100, 0));
+            PropertyValuesHolder panelAlpha = PropertyValuesHolder.ofFloat(View.ALPHA, 1f, 0f);
+            PropertyValuesHolder panelDrift =
+                    PropertyValuesHolder.ofFloat("translationY", 0, yDrift);
+            ObjectAnimator panelAlphaAndDrift =
+                    ObjectAnimator.ofPropertyValuesHolder(revealView, panelAlpha, panelDrift);
+            panelAlphaAndDrift.setDuration(revealDuration);
 
-                mStateAnimation.play(panelAlphaAndDrift);
+            panelAlphaAndDrift.setInterpolator(new LogDecelerateInterpolator(100, 0));
+            panelAlphaAndDrift.setStartDelay(itemsAlphaStagger);
 
-                if (page instanceof CellLayout) {
-                    final CellLayout cellLayout = (CellLayout) page;
-                    cellLayout.enableHardwareLayer(true);
+            mStateAnimation.play(panelAlphaAndDrift);
 
-                    final View iconsView = cellLayout.getShortcutsAndWidgets();
+            if (page != null) {
+                page.setLayerType(View.LAYER_TYPE_HARDWARE, null);
 
-                    LauncherViewPropertyAnimator iconsAlpha =
-                            new LauncherViewPropertyAnimator(iconsView);
-                    iconsAlpha.alpha(0f)
-                        .setDuration(revealDuration - 100)
-                        .setInterpolator(new LogDecelerateInterpolator(100, 0));
+                ObjectAnimator pageDrift = ObjectAnimator.ofFloat(page, "translationY", 0, yDrift);
+                pageDrift.setDuration(revealDuration);
+                pageDrift.setInterpolator(new LogDecelerateInterpolator(100, 0));
+                pageDrift.setStartDelay(itemsAlphaStagger);
+                mStateAnimation.play(pageDrift);
 
-                    mStateAnimation.play(iconsAlpha);
+                page.setAlpha(1f);
+                ObjectAnimator itemsAlpha = ObjectAnimator.ofFloat(page, View.ALPHA, 1f, 0f);
+                itemsAlpha.setDuration(revealDuration);
+                itemsAlpha.setInterpolator(new LogDecelerateInterpolator(100, 0));
+                mStateAnimation.play(itemsAlpha);
+            }
 
-                    mStateAnimation.addListener(new AnimatorListenerAdapter() {
-                        @Override
-                        public void onAnimationEnd(Animator animation) {
-                            cellLayout.setTranslationY(0);
-                            cellLayout.setAlpha(1f);
-                            iconsView.setAlpha(1f);
-                        }
-                    });
-                }
+            View pageIndicators = fromView.findViewById(R.id.apps_customize_page_indicator);
+            pageIndicators.setAlpha(1f);
+            ObjectAnimator indicatorsAlpha =
+                    ObjectAnimator.ofFloat(pageIndicators, "alpha", 0f);
+            indicatorsAlpha.setDuration(revealDuration);
+            indicatorsAlpha.setInterpolator(new DecelerateInterpolator(1.5f));
+            mStateAnimation.play(indicatorsAlpha);
 
-                View pageIndicators = fromView.findViewById(R.id.apps_customize_page_indicator);
-                final LauncherViewPropertyAnimator indicatorsAlpha =
-                        new LauncherViewPropertyAnimator(pageIndicators);
-                indicatorsAlpha.alpha(0f);
-                indicatorsAlpha.setDuration(revealDuration);
-                indicatorsAlpha.setInterpolator(new DecelerateInterpolator(1.5f));
-                mStateAnimation.play(indicatorsAlpha);
+            width = revealView.getMeasuredWidth();
 
-                width = revealView.getMeasuredWidth();
-
+            if (material) {
                 Animator reveal =
                         ViewAnimationUtils.createCircularReveal(revealView, width / 2,
                                 height / 2 + 100, revealRadius, 0f);
                 reveal.setInterpolator(new LogDecelerateInterpolator(100, 0));
                 reveal.setDuration(revealDuration);
+                reveal.setStartDelay(itemsAlphaStagger);
 
                 reveal.addListener(new AnimatorListenerAdapter() {
-                    @Override
                     public void onAnimationEnd(Animator animation) {
-                        fromView.setVisibility(View.GONE);
+                        revealView.setVisibility(View.INVISIBLE);
                     }
                 });
 
-                dispatchOnLauncherTransitionPrepare(fromView, animated, true);
-                dispatchOnLauncherTransitionPrepare(toView, animated, true);
-                mAppsCustomizeContent.stopScrolling();
-
                 mStateAnimation.play(reveal);
             }
+
+            dispatchOnLauncherTransitionPrepare(fromView, animated, true);
+            dispatchOnLauncherTransitionPrepare(toView, animated, true);
+            mAppsCustomizeContent.stopScrolling();
+
             if (workspaceAnim != null) {
                 mStateAnimation.play(workspaceAnim);
             }
@@ -3611,6 +3541,12 @@
                     if (onCompleteRunnable != null) {
                         onCompleteRunnable.run();
                     }
+
+                    revealView.setLayerType(View.LAYER_TYPE_NONE, null);
+                    if (page != null) {
+                        page.setLayerType(View.LAYER_TYPE_NONE, null);
+                    }
+                    content.setPageBackgroundsVisible(true);
                     mAppsCustomizeContent.updateCurrentPageScroll();
                 }
             });
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 1037d98..90a6b15 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -152,16 +152,11 @@
     protected int mTouchState = TOUCH_STATE_REST;
     protected boolean mForceScreenScrolled = false;
 
-
     protected OnLongClickListener mLongClickListener;
 
     protected int mTouchSlop;
     private int mPagingTouchSlop;
     private int mMaximumVelocity;
-    protected int mPageLayoutPaddingTop;
-    protected int mPageLayoutPaddingBottom;
-    protected int mPageLayoutPaddingLeft;
-    protected int mPageLayoutPaddingRight;
     protected int mPageLayoutWidthGap;
     protected int mPageLayoutHeightGap;
     protected int mCellCountX = 0;
@@ -283,14 +278,6 @@
         TypedArray a = context.obtainStyledAttributes(attrs,
                 R.styleable.PagedView, defStyle, 0);
 
-        mPageLayoutPaddingTop = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingTop, 0);
-        mPageLayoutPaddingBottom = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingBottom, 0);
-        mPageLayoutPaddingLeft = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingLeft, 0);
-        mPageLayoutPaddingRight = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingRight, 0);
         mPageLayoutWidthGap = a.getDimensionPixelSize(
                 R.styleable.PagedView_pageLayoutWidthGap, 0);
         mPageLayoutHeightGap = a.getDimensionPixelSize(
@@ -339,8 +326,9 @@
 
         // Hook up the page indicator
         ViewGroup parent = (ViewGroup) getParent();
+        ViewGroup grandParent = (ViewGroup) parent.getParent();
         if (mPageIndicator == null && mPageIndicatorViewId > -1) {
-            mPageIndicator = (PageIndicator) parent.findViewById(mPageIndicatorViewId);
+            mPageIndicator = (PageIndicator) grandParent.findViewById(mPageIndicatorViewId);
             mPageIndicator.removeAllMarkers(mAllowPagedViewAnimations);
 
             ArrayList<PageIndicator.PageMarkerResources> markers =
diff --git a/src/com/android/launcher3/PagedViewGridLayout.java b/src/com/android/launcher3/PagedViewGridLayout.java
index b286861..f69fa56 100644
--- a/src/com/android/launcher3/PagedViewGridLayout.java
+++ b/src/com/android/launcher3/PagedViewGridLayout.java
@@ -56,18 +56,6 @@
         }
     }
 
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        // PagedView currently has issues with different-sized pages since it calculates the
-        // offset of each page to scroll to before it updates the actual size of each page
-        // (which can change depending on the content if the contents aren't a fixed size).
-        // We work around this by having a minimum size on each widget page).
-        int widthSpecSize = Math.min(getSuggestedMinimumWidth(),
-                MeasureSpec.getSize(widthMeasureSpec));
-        int widthSpecMode = MeasureSpec.EXACTLY;
-        super.onMeasure(MeasureSpec.makeMeasureSpec(widthSpecSize, widthSpecMode),
-                heightMeasureSpec);
-    }
-
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index f9fc14b..c8f2f33 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -210,7 +210,6 @@
     private final int[] mTempXY = new int[2];
     private int[] mTempVisiblePagesRange = new int[2];
     private boolean mOverscrollTransformsSet;
-    private float mLastOverscrollPivotX;
     public static final int DRAG_BITMAP_PADDING = 2;
     private boolean mWorkspaceFadeInAdjacentScreens;
 
@@ -1692,20 +1691,13 @@
 
             final boolean isLeftPage = mOverScrollX < 0;
             index = (!isRtl && isLeftPage) || (isRtl && !isLeftPage) ? lowerIndex : upperIndex;
-            pivotX = isLeftPage ? rightBiasedPivot : leftBiasedPivot;
 
             CellLayout cl = (CellLayout) getChildAt(index);
             float scrollProgress = getScrollProgress(screenCenter, cl, index);
             cl.setOverScrollAmount(Math.abs(scrollProgress), isLeftPage);
-            float rotation = -WORKSPACE_OVERSCROLL_ROTATION * scrollProgress;
-            cl.setRotationY(rotation);
 
-            if (!mOverscrollTransformsSet || Float.compare(mLastOverscrollPivotX, pivotX) != 0) {
+            if (!mOverscrollTransformsSet) {
                 mOverscrollTransformsSet = true;
-                mLastOverscrollPivotX = pivotX;
-                cl.setCameraDistance(mDensity * mCameraDistance);
-                cl.setPivotX(cl.getMeasuredWidth() * pivotX);
-                cl.setPivotY(cl.getMeasuredHeight() * 0.5f);
                 cl.setOverscrollTransformsDirty(true);
             }
         } else {
diff --git a/src/com/android/launcher3/compat/UserManagerCompatVL.java b/src/com/android/launcher3/compat/UserManagerCompatVL.java
index ad6f78e..0ad824b 100644
--- a/src/com/android/launcher3/compat/UserManagerCompatVL.java
+++ b/src/com/android/launcher3/compat/UserManagerCompatVL.java
@@ -48,7 +48,12 @@
 
     @Override
     public Drawable getBadgedDrawableForUser(Drawable unbadged, UserHandleCompat user) {
-        return mUserManager.getBadgedIconForUser(unbadged, user.getUser());
+        try {
+            // STOPSHIP(mokani): Clean this up.
+            return mUserManager.getBadgedIconForUser(unbadged, user.getUser());
+        } catch (Throwable t) {
+            return unbadged;
+        }
     }
 
     @Override