diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java
index eeca329..7f6d78a 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java
@@ -20,7 +20,6 @@
 import android.view.View;
 import android.view.WindowInsets;
 
-import com.android.launcher3.DeviceProfile;
 import com.android.launcher3.R;
 import com.android.launcher3.allapps.ActivityAllAppsContainerView;
 import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext;
@@ -62,13 +61,6 @@
     }
 
     @Override
-    protected void updateBackground(DeviceProfile deviceProfile) {
-        super.updateBackground(deviceProfile);
-        // TODO(b/240670050): Remove this and add header protection for the taskbar entrypoint.
-        mBottomSheetBackground.setBackgroundResource(R.drawable.bg_rounded_corner_bottom_sheet);
-    }
-
-    @Override
     public boolean isInAllApps() {
         // All apps is always open
         return true;
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java
index fbc7be0..c6f7561 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java
@@ -97,6 +97,8 @@
         }
 
         if (FeatureFlags.ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION.get()) {
+            mAppsView.getAppsRecyclerViewContainer().setOutlineProvider(mViewOutlineProvider);
+            mAppsView.getAppsRecyclerViewContainer().setClipToOutline(true);
             findOnBackInvokedDispatcher().registerOnBackInvokedCallback(
                     OnBackInvokedDispatcher.PRIORITY_DEFAULT, mOnBackAnimationCallback);
         }
@@ -135,6 +137,16 @@
         setShiftRange(dp.allAppsShiftRange);
 
         mActivityContext.addOnDeviceProfileChangeListener(this);
+        setContentBackgroundWithParent(
+                getContext().getDrawable(R.drawable.bg_rounded_corner_bottom_sheet),
+                mAppsView.getBottomSheetBackground());
+    }
+
+    @Override
+    protected void onScaleProgressChanged() {
+        super.onScaleProgressChanged();
+        mAppsView.setClipChildren(!mIsBackProgressing);
+        mAppsView.getAppsRecyclerViewContainer().setClipChildren(!mIsBackProgressing);
     }
 
     @Override
diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
index 8fbe997..a2e2b26 100644
--- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
@@ -46,6 +46,7 @@
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.ViewOutlineProvider;
 import android.view.WindowInsets;
 import android.widget.Button;
@@ -259,6 +260,10 @@
         return mSearchUiManager;
     }
 
+    public View getBottomSheetBackground() {
+        return mBottomSheetBackground;
+    }
+
     public View getSearchView() {
         return mSearchContainer;
     }
@@ -894,7 +899,7 @@
      * The container for A-Z apps (the ViewPager for main+work tabs, or main RV). This is currently
      * hidden while searching.
      **/
-    protected View getAppsRecyclerViewContainer() {
+    public ViewGroup getAppsRecyclerViewContainer() {
         return mViewPager != null ? mViewPager : findViewById(R.id.apps_list_view);
     }
 
diff --git a/src/com/android/launcher3/util/ScrollableLayoutManager.java b/src/com/android/launcher3/util/ScrollableLayoutManager.java
index cb6ecaa..29c277c 100644
--- a/src/com/android/launcher3/util/ScrollableLayoutManager.java
+++ b/src/com/android/launcher3/util/ScrollableLayoutManager.java
@@ -33,7 +33,7 @@
 public class ScrollableLayoutManager extends GridLayoutManager {
 
     public static final float PREDICTIVE_BACK_MIN_SCALE = 0.9f;
-    private static final float EXTRA_BOTTOM_SPACE_BY_HEIGHT_PERCENT =
+    public static final float EXTRA_BOTTOM_SPACE_BY_HEIGHT_PERCENT =
             (1 - PREDICTIVE_BACK_MIN_SCALE) / 2;
 
     // keyed on item type
diff --git a/src/com/android/launcher3/views/AbstractSlideInView.java b/src/com/android/launcher3/views/AbstractSlideInView.java
index cb6a46c..8a9b179 100644
--- a/src/com/android/launcher3/views/AbstractSlideInView.java
+++ b/src/com/android/launcher3/views/AbstractSlideInView.java
@@ -30,15 +30,18 @@
 import android.animation.PropertyValuesHolder;
 import android.content.Context;
 import android.graphics.Canvas;
+import android.graphics.Outline;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.util.Property;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewOutlineProvider;
 import android.view.animation.Interpolator;
 
 import androidx.annotation.FloatRange;
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.Px;
 
@@ -96,8 +99,21 @@
 
     private final AnimatedFloat mSlideInViewScale =
             new AnimatedFloat(this::onScaleProgressChanged, VIEW_NO_SCALE);
-    private boolean mIsBackProgressing;
+    protected boolean mIsBackProgressing;
     @Nullable private Drawable mContentBackground;
+    @Nullable private View mContentBackgroundParentView;
+
+    protected final ViewOutlineProvider mViewOutlineProvider = new ViewOutlineProvider() {
+        @Override
+        public void getOutline(View view, Outline outline) {
+            outline.setRect(
+                    0,
+                    0,
+                    view.getMeasuredWidth(),
+                    view.getMeasuredHeight() + getBottomOffsetPx()
+            );
+        }
+    };
 
     public AbstractSlideInView(Context context, AttributeSet attrs, int defStyleAttr) {
         super(context, attrs, defStyleAttr);
@@ -119,10 +135,6 @@
         mColorScrim = scrimColor != -1 ? createColorScrim(context, scrimColor) : null;
     }
 
-    protected void setContentBackground(Drawable drawable) {
-        mContentBackground = drawable;
-    }
-
     protected void attachToContainer() {
         if (mColorScrim != null) {
             getPopupContainer().addView(mColorScrim);
@@ -190,7 +202,7 @@
                 + (1 - PREDICTIVE_BACK_MIN_SCALE) * (1 - deceleratedProgress));
     }
 
-    private void onScaleProgressChanged() {
+    protected void onScaleProgressChanged() {
         float scaleProgress = mSlideInViewScale.value;
         SCALE_PROPERTY.set(this, scaleProgress);
         setClipChildren(!mIsBackProgressing);
@@ -222,16 +234,27 @@
         super.dispatchDraw(canvas);
     }
 
+    /**
+     * Set slide in view's background {@link Drawable} which will be draw onto a parent view in
+     * {@link #dispatchDraw(Canvas)}
+     */
+    protected void setContentBackgroundWithParent(
+            @NonNull Drawable drawable, @NonNull View parentView) {
+        mContentBackground = drawable;
+        mContentBackgroundParentView = parentView;
+    }
+
     /** Draw scaled background during predictive back animation. */
-    protected void drawScaledBackground(Canvas canvas) {
-        if (mContentBackground == null) {
+    private void drawScaledBackground(Canvas canvas) {
+        if (mContentBackground == null || mContentBackgroundParentView == null) {
             return;
         }
         mContentBackground.setBounds(
-                mContent.getLeft(),
-                mContent.getTop() + (int) mContent.getTranslationY(),
-                mContent.getRight(),
-                mContent.getBottom() + (mIsBackProgressing ? getBottomOffsetPx() : 0));
+                mContentBackgroundParentView.getLeft(),
+                mContentBackgroundParentView.getTop() + (int) mContent.getTranslationY(),
+                mContentBackgroundParentView.getRight(),
+                mContentBackgroundParentView.getBottom()
+                        + (mIsBackProgressing ? getBottomOffsetPx() : 0));
         mContentBackground.draw(canvas);
     }
 
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
index 06c622d..23cdae9 100644
--- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java
+++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -112,13 +112,14 @@
         if (!hasSeenEducationTip()) {
             addOnLayoutChangeListener(mLayoutChangeListenerToShowTips);
         }
-        setContentBackground(getContext().getDrawable(R.drawable.bg_rounded_corner_bottom_sheet));
     }
 
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
         mContent = findViewById(R.id.widgets_bottom_sheet);
+        setContentBackgroundWithParent(
+                getContext().getDrawable(R.drawable.bg_rounded_corner_bottom_sheet), mContent);
     }
 
     @Override
diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
index d5c4315..0403249 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
@@ -29,7 +29,6 @@
 import android.content.pm.LauncherApps;
 import android.content.res.Configuration;
 import android.content.res.Resources;
-import android.graphics.Outline;
 import android.graphics.Rect;
 import android.os.Process;
 import android.os.UserHandle;
@@ -41,7 +40,6 @@
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.ViewOutlineProvider;
 import android.view.WindowInsets;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
@@ -170,18 +168,6 @@
                 }
             };
 
-    private final ViewOutlineProvider mViewOutlineProvider = new ViewOutlineProvider() {
-        @Override
-        public void getOutline(View view, Outline outline) {
-            outline.setRect(
-                    0,
-                    0,
-                    view.getMeasuredWidth(),
-                    view.getMeasuredHeight() + getBottomOffsetPx()
-            );
-        }
-    };
-
     @Px private final int mTabsHeight;
 
     @Nullable private WidgetsRecyclerView mCurrentWidgetsRecyclerView;
@@ -227,7 +213,6 @@
 
         mUserManagerState.init(UserCache.INSTANCE.get(context),
                 context.getSystemService(UserManager.class));
-        setContentBackground(getContext().getDrawable(R.drawable.bg_widgets_full_sheet));
     }
 
     public WidgetsFullSheet(Context context, AttributeSet attrs) {
@@ -238,6 +223,8 @@
     protected void onFinishInflate() {
         super.onFinishInflate();
         mContent = findViewById(R.id.container);
+        setContentBackgroundWithParent(getContext().getDrawable(R.drawable.bg_widgets_full_sheet),
+                mContent);
 
         mContent.setOutlineProvider(mViewOutlineProvider);
         mContent.setClipToOutline(true);
