diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
index f2162b0..2d7fe69 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
@@ -191,6 +191,9 @@
                     1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD,
                     1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD));
             config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_ACCELERATE);
+            if (!isTablet) {
+                config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT);
+            }
         } else if (fromState == NORMAL && toState == ALL_APPS) {
             if (mActivity.getDeviceProfile().isTablet) {
                 config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_DECELERATE);
diff --git a/quickstep/src/com/android/quickstep/TopTaskTracker.java b/quickstep/src/com/android/quickstep/TopTaskTracker.java
index 39c5f2a..723dc72 100644
--- a/quickstep/src/com/android/quickstep/TopTaskTracker.java
+++ b/quickstep/src/com/android/quickstep/TopTaskTracker.java
@@ -15,12 +15,13 @@
  */
 package com.android.quickstep;
 
+import static android.app.ActivityTaskManager.INVALID_TASK_ID;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
 import static android.content.Intent.ACTION_CHOOSER;
 import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
 
 import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
-import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_ASSISTANT;
 
 import android.app.ActivityManager.RunningTaskInfo;
 import android.content.Context;
@@ -64,6 +65,7 @@
 
     private final StagedSplitTaskPosition mMainStagePosition = new StagedSplitTaskPosition();
     private final StagedSplitTaskPosition mSideStagePosition = new StagedSplitTaskPosition();
+    private int mPinnedTaskId = INVALID_TASK_ID;
 
     private TopTaskTracker(Context context) {
         mMainStagePosition.stageType = SplitConfigurationOptions.STAGE_TYPE_MAIN;
@@ -132,8 +134,18 @@
         }
     }
 
+    @Override
+    public void onActivityPinned(String packageName, int userId, int taskId, int stackId) {
+        mPinnedTaskId = taskId;
+    }
+
+    @Override
+    public void onActivityUnpinned() {
+        mPinnedTaskId = INVALID_TASK_ID;
+    }
+
     private void resetTaskId(StagedSplitTaskPosition taskPosition) {
-        taskPosition.taskId = -1;
+        taskPosition.taskId = INVALID_TASK_ID;
     }
 
     /**
@@ -141,7 +153,8 @@
      *         Will return empty array if device is not in staged split
      */
     public int[] getRunningSplitTaskIds() {
-        if (mMainStagePosition.taskId == -1 || mSideStagePosition.taskId == -1) {
+        if (mMainStagePosition.taskId == INVALID_TASK_ID
+                || mSideStagePosition.taskId == INVALID_TASK_ID) {
             return new int[]{};
         }
         int[] out = new int[2];
@@ -175,7 +188,11 @@
                             false /* filterOnlyVisibleRecents */));
             Collections.addAll(mOrderedTaskList, tasks);
         }
-        return new CachedTaskInfo(new ArrayList<>(mOrderedTaskList));
+
+        // Strip the pinned task
+        ArrayList<RunningTaskInfo> tasks = new ArrayList<>(mOrderedTaskList);
+        tasks.removeIf(t -> t.taskId == mPinnedTaskId);
+        return new CachedTaskInfo(tasks);
     }
 
     /**
@@ -194,7 +211,7 @@
         }
 
         public int getTaskId() {
-            return mTopTask == null ? -1 : mTopTask.taskId;
+            return mTopTask == null ? INVALID_TASK_ID : mTopTask.taskId;
         }
 
         /**
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a10aa19..2109510 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -44,9 +44,9 @@
         <item name="isMainColorDark">false</item>
         <item name="isWorkspaceDarkText">false</item>
         <item name="workspaceTextColor">@color/workspace_text_color_light</item>
-        <item name="workspaceShadowColor">#ff000000</item>
-        <item name="workspaceAmbientShadowColor">#33000000</item>
-        <item name="workspaceKeyShadowColor">#ff000000</item>
+        <item name="workspaceShadowColor">#B0000000</item>
+        <item name="workspaceAmbientShadowColor">#40000000</item>
+        <item name="workspaceKeyShadowColor">#89000000</item>
         <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
         <item name="widgetsTheme">@style/WidgetContainerTheme</item>
         <item name="folderDotColor">@color/folder_dot_color</item>
@@ -82,9 +82,9 @@
 
     <style name="LauncherTheme.DarkText" parent="@style/LauncherTheme">
         <item name="workspaceTextColor">@color/workspace_text_color_dark</item>
-        <item name="workspaceShadowColor">#ffffffff</item>
-        <item name="workspaceAmbientShadowColor">#33ffffff</item>
-        <item name="workspaceKeyShadowColor">#ffffffff</item>
+        <item name="workspaceShadowColor">@android:color/transparent</item>
+        <item name="workspaceAmbientShadowColor">@android:color/transparent</item>
+        <item name="workspaceKeyShadowColor">@android:color/transparent</item>
         <item name="isWorkspaceDarkText">true</item>
         <item name="workspaceStatusBarScrim">@null</item>
         <item name="workspaceAccentColor">@color/workspace_accent_color_dark</item>
@@ -132,9 +132,9 @@
     <style name="LauncherTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark">
         <item name="android:colorControlHighlight">#19212121</item>
         <item name="workspaceTextColor">@color/workspace_text_color_dark</item>
-        <item name="workspaceShadowColor">#ffffffff</item>
-        <item name="workspaceAmbientShadowColor">#33ffffff</item>
-        <item name="workspaceKeyShadowColor">#ffffffff</item>
+        <item name="workspaceShadowColor">@android:color/transparent</item>
+        <item name="workspaceAmbientShadowColor">@android:color/transparent</item>
+        <item name="workspaceKeyShadowColor">@android:color/transparent</item>
         <item name="isWorkspaceDarkText">true</item>
         <item name="workspaceStatusBarScrim">@null</item>
         <item name="workspaceAccentColor">@color/workspace_accent_color_dark</item>
@@ -250,14 +250,14 @@
 
     <!-- Icon displayed on the workspace -->
     <style name="BaseIcon.Workspace.Shadows" parent="BaseIcon">
-        <item name="android:shadowRadius">1.0</item>
+        <item name="android:shadowRadius">2.0</item>
         <item name="android:shadowColor">?attr/workspaceShadowColor</item>
         <item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item>
-        <item name="ambientShadowBlur">1.0dp</item>
+        <item name="ambientShadowBlur">1.5dp</item>
         <item name="keyShadowColor">?attr/workspaceKeyShadowColor</item>
-        <item name="keyShadowBlur">1.0dp</item>
-        <item name="keyShadowOffsetX">0dp</item>
-        <item name="keyShadowOffsetY">0dp</item>
+        <item name="keyShadowBlur">.5dp</item>
+        <item name="keyShadowOffsetX">.5dp</item>
+        <item name="keyShadowOffsetY">.5dp</item>
     </style>
 
     <!-- Intentionally empty so we can override -->
diff --git a/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java b/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
index c7c4607..fcba246 100644
--- a/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
+++ b/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
@@ -119,7 +119,7 @@
          * Returns true if the items represent the same object
          */
         public boolean isSameAs(AdapterItem other) {
-            return (other.viewType != viewType) && (other.getClass() == getClass());
+            return (other.viewType == viewType) && (other.getClass() == getClass());
         }
 
         /**
diff --git a/src/com/android/launcher3/allapps/SearchUiManager.java b/src/com/android/launcher3/allapps/SearchUiManager.java
index 6299657..6138bc4 100644
--- a/src/com/android/launcher3/allapps/SearchUiManager.java
+++ b/src/com/android/launcher3/allapps/SearchUiManager.java
@@ -68,4 +68,9 @@
 
     /** Refresh the currently displayed list of results. */
     default void refreshResults() {}
+
+    /** Returns whether search is in zero state. */
+    default boolean inZeroState() {
+        return false;
+    }
 }
diff --git a/src/com/android/launcher3/touch/AllAppsSwipeController.java b/src/com/android/launcher3/touch/AllAppsSwipeController.java
index 787d9ea..db43baa 100644
--- a/src/com/android/launcher3/touch/AllAppsSwipeController.java
+++ b/src/com/android/launcher3/touch/AllAppsSwipeController.java
@@ -65,13 +65,13 @@
     public static final Interpolator BLUR =
             Interpolators.clampToProgress(
                     Interpolators.mapToProgress(
-                            EMPHASIZED_DECELERATE, 0f, ALL_APPS_FULL_DEPTH_PROGRESS),
+                            LINEAR, 0f, ALL_APPS_FULL_DEPTH_PROGRESS),
                     WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
     public static final Interpolator WORKSPACE_FADE =
             Interpolators.clampToProgress(FINAL_FRAME, 0f, ALL_APPS_STATE_TRANSITION);
     public static final Interpolator WORKSPACE_SCALE =
             Interpolators.clampToProgress(
-                    EMPHASIZED_DECELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
+                    EMPHASIZED_ACCELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
     public static final Interpolator HOTSEAT_FADE = WORKSPACE_FADE;
     public static final Interpolator HOTSEAT_SCALE = HOTSEAT_FADE;
     public static final Interpolator HOTSEAT_TRANSLATE =
@@ -157,6 +157,9 @@
         config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER);
         config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet
                 ? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER);
+        if (!isTablet) {
+            config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT);
+        }
     }
 
     /**
diff --git a/src/com/android/launcher3/util/OnboardingPrefs.java b/src/com/android/launcher3/util/OnboardingPrefs.java
index 64aeceb..f4cf21e 100644
--- a/src/com/android/launcher3/util/OnboardingPrefs.java
+++ b/src/com/android/launcher3/util/OnboardingPrefs.java
@@ -142,16 +142,11 @@
     }
 
     /**
-     * Add "incCountBy" to the given event count, if we haven't already reached the max count.
+     * Sets the event count to the given value.
      *
      * @return Whether we have now reached the max count.
      */
-    public boolean incrementEventCountBy(int incCountBy, @EventCountKey String eventKey) {
-        int count = getCount(eventKey);
-        if (hasReachedMaxCount(count, eventKey)) {
-            return true;
-        }
-        count += incCountBy;
+    public boolean setEventCount(int count, @EventCountKey String eventKey) {
         mSharedPrefs.edit().putInt(eventKey, count).apply();
         return hasReachedMaxCount(count, eventKey);
     }
diff --git a/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java b/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java
index 374555c..a309e6e 100644
--- a/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java
+++ b/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java
@@ -16,6 +16,8 @@
 
 package com.android.launcher3.views;
 
+import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
+
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.graphics.Canvas;
@@ -54,10 +56,11 @@
             super.onDraw(canvas);
             return;
         }
+        int alpha = Color.alpha(getCurrentTextColor());
 
         // We enhance the shadow by drawing the shadow twice
         getPaint().setShadowLayer(mShadowInfo.ambientShadowBlur, 0, 0,
-                mShadowInfo.ambientShadowColor);
+                getTextShadowColor(mShadowInfo.ambientShadowColor, alpha));
 
         drawWithoutDot(canvas);
         canvas.save();
@@ -69,7 +72,7 @@
                 mShadowInfo.keyShadowBlur,
                 mShadowInfo.keyShadowOffsetX,
                 mShadowInfo.keyShadowOffsetY,
-                mShadowInfo.keyShadowColor);
+                getTextShadowColor(mShadowInfo.keyShadowColor, alpha));
         drawWithoutDot(canvas);
         canvas.restore();
 
@@ -110,18 +113,24 @@
                 return true;
             } else if (ambientShadowAlpha > 0 && keyShadowAlpha == 0) {
                 textView.getPaint().setShadowLayer(ambientShadowBlur, 0, 0,
-                        ambientShadowColor);
+                        getTextShadowColor(ambientShadowColor, textAlpha));
                 return true;
             } else if (keyShadowAlpha > 0 && ambientShadowAlpha == 0) {
                 textView.getPaint().setShadowLayer(
                         keyShadowBlur,
                         keyShadowOffsetX,
                         keyShadowOffsetY,
-                        keyShadowColor);
+                        getTextShadowColor(keyShadowColor, textAlpha));
                 return true;
             } else {
                 return false;
             }
         }
     }
+
+    // Multiplies the alpha of shadowColor by textAlpha.
+    private static int getTextShadowColor(int shadowColor, int textAlpha) {
+        return setColorAlphaBound(shadowColor,
+                Math.round(Color.alpha(shadowColor) * textAlpha / 255f));
+    }
 }
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java
index babe607..acdd9a1 100644
--- a/src/com/android/launcher3/views/FloatingIconView.java
+++ b/src/com/android/launcher3/views/FloatingIconView.java
@@ -525,7 +525,7 @@
                     & ItemInfoWithIcon.FLAG_SHOW_DOWNLOAD_PROGRESS_MASK) != 0) {
                 btvIcon = btv.makePreloadIcon();
             } else {
-                btvIcon = btv.getIcon();
+                btvIcon = (FastBitmapDrawable) btv.getIcon().getConstantState().newDrawable();
             }
         } else {
             btvIcon = null;
