diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
index 0b537e2..8291475 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
@@ -28,6 +28,7 @@
 import androidx.annotation.LayoutRes;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
+import androidx.core.graphics.ColorUtils;
 
 import com.android.launcher3.BubbleTextView;
 import com.android.launcher3.Insettable;
@@ -35,6 +36,7 @@
 import com.android.launcher3.Utilities;
 import com.android.launcher3.config.FeatureFlags;
 import com.android.launcher3.folder.FolderIcon;
+import com.android.launcher3.icons.ThemedIconDrawable;
 import com.android.launcher3.model.data.FolderInfo;
 import com.android.launcher3.model.data.ItemInfo;
 import com.android.launcher3.model.data.WorkspaceItemInfo;
@@ -43,14 +45,17 @@
 import com.android.launcher3.util.LauncherBindableItemsContainer;
 import com.android.launcher3.views.ActivityContext;
 import com.android.launcher3.views.AllAppsButton;
+import com.android.launcher3.views.DoubleShadowBubbleTextView;
 
 /**
  * Hosts the Taskbar content such as Hotseat and Recent Apps. Drawn on top of other apps.
  */
 public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconParent, Insettable {
 
-    private final int[] mTempOutLocation = new int[2];
+    private static final float TASKBAR_BACKGROUND_LUMINANCE = 0.30f;
+    public int mThemeIconsBackground;
 
+    private final int[] mTempOutLocation = new int[2];
     private final Rect mIconLayoutBounds = new Rect();
     private final int mIconTouchSize;
     private final int mItemMarginLeftRight;
@@ -103,6 +108,8 @@
         // Needed to draw folder leave-behind when opening one.
         setWillNotDraw(false);
 
+        mThemeIconsBackground = calculateThemeIconsBackground();
+
         if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()) {
             mAllAppsButton = new AllAppsButton(context);
             mAllAppsButton.setLayoutParams(
@@ -111,6 +118,21 @@
         }
     }
 
+    private int getColorWithGivenLuminance(int color, float luminance) {
+        float[] colorHSL = new float[3];
+        ColorUtils.colorToHSL(color, colorHSL);
+        colorHSL[2] = luminance;
+        return ColorUtils.HSLToColor(colorHSL);
+    }
+
+    private int calculateThemeIconsBackground() {
+        int color = ThemedIconDrawable.getColors(mContext)[0];
+        if (Utilities.isDarkTheme(mContext)) {
+            return getColorWithGivenLuminance(color, TASKBAR_BACKGROUND_LUMINANCE);
+        }
+        return color;
+    }
+
     protected void init(TaskbarViewController.TaskbarViewCallbacks callbacks) {
         mControllerCallbacks = callbacks;
         mIconClickListener = mControllerCallbacks.getIconOnClickListener();
@@ -219,6 +241,24 @@
             int index = Utilities.isRtl(getResources()) ? 0 : getChildCount();
             addView(mAllAppsButton, index);
         }
+
+        mThemeIconsBackground = calculateThemeIconsBackground();
+        setThemedIconsBackgroundColor(mThemeIconsBackground);
+    }
+
+    /**
+     * Traverse all the child views and change the background of themeIcons
+     **/
+    public void setThemedIconsBackgroundColor(int color) {
+        for (View icon : getIconViews()) {
+            if (icon instanceof DoubleShadowBubbleTextView) {
+                DoubleShadowBubbleTextView textView = ((DoubleShadowBubbleTextView) icon);
+                if (textView.getIcon() != null
+                        && textView.getIcon() instanceof ThemedIconDrawable) {
+                    ((ThemedIconDrawable) textView.getIcon()).changeBackgroundColor(color);
+                }
+            }
+        }
     }
 
     /**
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
index a89061b..f5c382d 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
@@ -27,6 +27,7 @@
 import android.view.MotionEvent;
 import android.view.View;
 
+import androidx.core.graphics.ColorUtils;
 import androidx.core.view.OneShotPreDrawListener;
 
 import com.android.launcher3.BubbleTextView;
@@ -37,6 +38,7 @@
 import com.android.launcher3.anim.PendingAnimation;
 import com.android.launcher3.config.FeatureFlags;
 import com.android.launcher3.folder.FolderIcon;
+import com.android.launcher3.icons.ThemedIconDrawable;
 import com.android.launcher3.model.data.ItemInfo;
 import com.android.launcher3.util.ItemInfoMatcher;
 import com.android.launcher3.util.LauncherBindableItemsContainer;
@@ -71,6 +73,9 @@
             this::updateTranslationY);
     private AnimatedFloat mTaskbarNavButtonTranslationY;
 
+    private final AnimatedFloat mThemeIconsBackground = new AnimatedFloat(
+            this::updateIconsBackground);
+
     private final TaskbarModelCallbacks mModelCallbacks;
 
     // Initialized in init.
@@ -81,6 +86,8 @@
     private AnimatorPlaybackController mIconAlignControllerLazy = null;
     private Runnable mOnControllerPreCreateCallback = NO_OP;
 
+    private int mThemeIconsColor;
+
     public TaskbarViewController(TaskbarActivityContext activity, TaskbarView taskbarView) {
         mActivity = activity;
         mTaskbarView = taskbarView;
@@ -93,6 +100,7 @@
         mControllers = controllers;
         mTaskbarView.init(new TaskbarViewCallbacks());
         mTaskbarView.getLayoutParams().height = mActivity.getDeviceProfile().taskbarSize;
+        mThemeIconsColor = ThemedIconDrawable.getColors(mTaskbarView.getContext())[0];
 
         mTaskbarIconScaleForStash.updateValue(1f);
 
@@ -182,6 +190,15 @@
                 + mTaskbarIconTranslationYForStash.value);
     }
 
+    private void updateIconsBackground() {
+        mTaskbarView.setThemedIconsBackgroundColor(
+                ColorUtils.blendARGB(
+                        mThemeIconsColor,
+                        mTaskbarView.mThemeIconsBackground,
+                        mThemeIconsBackground.value
+                ));
+    }
+
     /**
      * Sets the taskbar icon alignment relative to Launcher hotseat icons
      * @param alignmentRatio [0, 1]
@@ -217,6 +234,10 @@
         setter.setFloat(mTaskbarIconTranslationYForHome, VALUE, -offsetY, LINEAR);
         setter.setFloat(mTaskbarNavButtonTranslationY, VALUE, -offsetY, LINEAR);
 
+        if (Utilities.isDarkTheme(mTaskbarView.getContext())) {
+            setter.addFloat(mThemeIconsBackground, VALUE, 0f, 1f, LINEAR);
+        }
+
         int collapsedHeight = mActivity.getDefaultTaskbarWindowHeight();
         int expandedHeight = Math.max(collapsedHeight,
                 mActivity.getDeviceProfile().taskbarSize + offsetY);
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
index 2ab8ecd..487b9f8 100644
--- a/res/color-v31/overview_scrim_dark.xml
+++ b/res/color-v31/overview_scrim_dark.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
+  <item android:color="@android:color/system_neutral1_500" android:lStar="15" />
 </selector>
diff --git a/src/com/android/launcher3/settings/NotificationDotsPreference.java b/src/com/android/launcher3/settings/NotificationDotsPreference.java
index 0ee2744..f2a052d 100644
--- a/src/com/android/launcher3/settings/NotificationDotsPreference.java
+++ b/src/com/android/launcher3/settings/NotificationDotsPreference.java
@@ -89,7 +89,8 @@
         // Update intent
         Bundle extras = new Bundle();
         extras.putString(EXTRA_FRAGMENT_ARG_KEY, "notification_badging");
-        setIntent(new Intent("android.settings.NOTIFICATION_SETTINGS")
+
+        setIntent(new Intent("android.settings.SETTINGS_EMBED_DEEP_LINK_ACTIVITY")
                 .putExtra(EXTRA_SHOW_FRAGMENT_ARGS, extras));
     }
 
