diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
index 0b850bd..042bc9a 100644
--- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
@@ -154,6 +154,12 @@
         }
     }
 
+    @Override
+    protected boolean isTaskbarTouchable() {
+        return !(mTaskbarLauncherStateController.isAnimatingToLauncher()
+                && mTaskbarLauncherStateController.isTaskbarAlignedWithHotseat());
+    }
+
     public void setShouldDelayLauncherStateAnim(boolean shouldDelayLauncherStateAnim) {
         mTaskbarLauncherStateController.setShouldDelayLauncherStateAnim(
                 shouldDelayLauncherStateAnim);
@@ -447,16 +453,6 @@
     }
 
     @Override
-    public boolean isHotseatVisibleForTaskBarAlignment() {
-        return mTaskbarLauncherStateController.isHotseatVisibleForTaskbarAlignment();
-    }
-
-    @Override
-    public boolean isAnimatingToLauncher() {
-        return mTaskbarLauncherStateController.isAnimatingToLauncher();
-    }
-
-    @Override
     protected boolean isInOverviewUi() {
         return mTaskbarLauncherStateController.isInOverviewUi();
     }
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
index 55722a9..058dd07 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
@@ -47,7 +47,6 @@
 import com.android.internal.policy.GestureNavigationSettingsObserver
 import com.android.launcher3.DeviceProfile
 import com.android.launcher3.R
-import com.android.launcher3.Utilities
 import com.android.launcher3.anim.AlphaUpdateListener
 import com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_NAVBAR_UNIFICATION
 import com.android.launcher3.config.FeatureFlags.enableTaskbarNoRecreate
@@ -134,6 +133,9 @@
         }
 
         val bubbleControllers = controllers.bubbleControllers.getOrNull()
+        val taskbarTouchableHeight = taskbarStashController.touchableHeight
+        val bubblesTouchableHeight =
+            bubbleControllers?.bubbleStashController?.getTouchableHeight() ?: 0
         // reset touch bounds
         defaultTouchableRegion.setEmpty()
         if (bubbleControllers != null) {
@@ -145,41 +147,16 @@
                 defaultTouchableRegion.addBoundsToRegion(bubbleBarViewController.bubbleBarBounds)
             }
         }
-        val uiController = controllers.uiController
         if (
-            !uiController.isHotseatVisibleForTaskBarAlignment ||
+            taskbarStashController.isInApp ||
+                taskbarStashController.isInOverview ||
                 DisplayController.showLockedTaskbarOnHome(context)
         ) {
-            // adding the taskbar touch region
-            var left = 0
-            var right = context.deviceProfile.widthPx
-            val touchableHeight: Int
-            if (uiController.isAnimatingToLauncher) {
-                val dp = controllers.taskbarActivityContext.deviceProfile
-                touchableHeight = windowLayoutParams.height
-                if (dp.isQsbInline) {
-                    // if Qsb is inline need to exclude search icon from touch region
-                    val isRtl = Utilities.isRtl(context.resources)
-                    val navBarOffset =
-                        bubbleControllers?.bubbleBarViewController?.let {
-                            val isBubblesOnLeft = it.bubbleBarLocation.isOnLeft(isRtl)
-                            dp.getHotseatTranslationXForNavBar(context, isBubblesOnLeft)
-                        } ?: 0
-                    val hotseatPadding: Rect = dp.getHotseatLayoutPadding(context)
-                    val borderSpacing: Int = dp.hotseatBorderSpace
-                    if (isRtl) {
-                        right = dp.widthPx - hotseatPadding.right + borderSpacing + navBarOffset
-                    } else {
-                        left = hotseatPadding.left - borderSpacing + navBarOffset
-                    }
-                }
-            } else {
-                // if not animating to launcher use the taskbar touchanle height
-                touchableHeight = taskbarStashController.touchableHeight
-            }
+            // only add the taskbar touch region if not on home
             val bottom = windowLayoutParams.height
-            val top = bottom - touchableHeight
-            defaultTouchableRegion.addBoundsToRegion(Rect(left, top, right, bottom))
+            val top = bottom - taskbarTouchableHeight
+            val right = context.deviceProfile.widthPx
+            defaultTouchableRegion.addBoundsToRegion(Rect(/* left= */ 0, top, right, bottom))
         }
 
         // Pre-calculate insets for different providers across different rotations for this gravity
@@ -391,6 +368,10 @@
             // Let touches pass through us.
             insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION)
             debugTouchableRegion.lastSetTouchableReason = "Stashed over IME"
+        } else if (!controllers.uiController.isTaskbarTouchable) {
+            // Let touches pass through us.
+            insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION)
+            debugTouchableRegion.lastSetTouchableReason = "Taskbar is not touchable"
         } else if (controllers.taskbarDragController.isSystemDragInProgress) {
             // Let touches pass through us.
             insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION)
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
index 4bc7d3c..fa04739 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
@@ -190,8 +190,6 @@
 
     private boolean mIsQsbInline;
 
-    private boolean mIsHotseatVisibleForTaskbarAlignment;
-
     private final DeviceProfile.OnDeviceProfileChangeListener mOnDeviceProfileChangeListener =
             new DeviceProfile.OnDeviceProfileChangeListener() {
                 @Override
@@ -733,7 +731,6 @@
             boolean committed) {
         boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher);
         TaskbarStashController stashController = mControllers.taskbarStashController;
-        TaskbarInsetsController insetsController = mControllers.taskbarInsetsController;
         stashController.updateStateForFlag(FLAG_IN_STASHED_LAUNCHER_STATE, isInStashedState);
         Animator stashAnimator = stashController.createApplyStateAnimator(duration);
         if (stashAnimator != null) {
@@ -742,11 +739,7 @@
                 public void onAnimationEnd(Animator animation) {
                     if (isInStashedState && committed) {
                         // Reset hotseat alpha to default
-                        updateIconAlphaForHome(
-                                /* taskbarAlpha = */ 0,
-                                ALPHA_CHANNEL_TASKBAR_ALIGNMENT,
-                                /* updateTaskbarAlpha = */ false
-                        );
+                        mLauncher.getHotseat().setIconsAlpha(1, ALPHA_CHANNEL_TASKBAR_ALIGNMENT);
                     }
                 }
 
@@ -871,14 +864,6 @@
         if (mIsQsbInline) {
             mLauncher.getHotseat().setQsbAlpha(targetAlpha, alphaChannel);
         }
-        if (alphaChannel == ALPHA_CHANNEL_TASKBAR_ALIGNMENT) {
-            boolean isHotseatVisibleForTaskbarAlignment = isHotseatVisibleForTaskbarAlignment();
-            if (mIsHotseatVisibleForTaskbarAlignment != isHotseatVisibleForTaskbarAlignment) {
-                mIsHotseatVisibleForTaskbarAlignment = isHotseatVisibleForTaskbarAlignment;
-                mControllers.taskbarInsetsController
-                        .onTaskbarOrBubblebarWindowHeightOrInsetsChanged();
-            }
-        }
     }
 
     /** Updates launcher home screen appearance accordingly to the bubble bar location. */
@@ -939,13 +924,6 @@
         translationXAnimation.start();
     }
 
-    /** Returns true if hotseat icons visible for the taskbar alignment */
-    public boolean isHotseatVisibleForTaskbarAlignment() {
-        return mLauncher.getHotseat()
-                .getIconsAlpha(ALPHA_CHANNEL_TASKBAR_ALIGNMENT).getValue() == 1;
-    }
-
-
     private final class TaskBarRecentsAnimationListener implements
             RecentsAnimationCallbacks.RecentsAnimationListener {
         private final RecentsAnimationCallbacks mCallbacks;
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java
index db69e8f..7030088 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java
@@ -75,14 +75,8 @@
         mControllers = null;
     }
 
-    /** Returns true if transition animation to launcher home is being played. */
-    public boolean isAnimatingToLauncher() {
-        return false;
-    }
-
-    /** Returns true if hotseat icons visible for the taskbar alignment. */
-    public boolean isHotseatVisibleForTaskBarAlignment() {
-        return false;
+    protected boolean isTaskbarTouchable() {
+        return true;
     }
 
     /**
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
index c0891a9..fcb583a 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
@@ -185,6 +185,7 @@
                     resources.getDrawable(R.drawable.taskbar_overflow_icon));
             mTaskbarOverflowView.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
         }
+        // TODO: Disable touch events on QSB otherwise it can crash.
         mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this, false);
 
         mMaxNumIcons = calculateMaxNumIcons();
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 5acff06..8dce723 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -187,7 +187,7 @@
     @ViewDebug.ExportedProperty(category = "launcher")
     private DotInfo mDotInfo;
     private DotRenderer mDotRenderer;
-    private Locale mCurrentLocale;
+    private String mCurrentLanguage;
     @ViewDebug.ExportedProperty(category = "launcher", deepExport = true)
     protected DotRenderer.DrawParams mDotParams;
     private Animator mDotScaleAnim;
@@ -298,7 +298,7 @@
 
         mDotParams = new DotRenderer.DrawParams();
 
-        mCurrentLocale = context.getResources().getConfiguration().locale;
+        mCurrentLanguage = context.getResources().getConfiguration().locale.getLanguage();
         setEllipsize(TruncateAt.END);
         setAccessibilityDelegate(mActivity.getAccessibilityDelegate());
         setTextAlpha(1f);
@@ -494,7 +494,7 @@
     }
 
     protected boolean isCurrentLanguageEnglish() {
-        return mCurrentLocale.equals(Locale.US);
+        return mCurrentLanguage.equals(Locale.ENGLISH.getLanguage());
     }
 
     @UiThread
