Fixed the hotseat placement in RTL mode

Updated logic that computest the hotseat shift.

Fixes: 372014534
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Put device into 3 buttons navigation mode, force RTL.
Hotseat is placed next to the navigation buttons bar.

Change-Id: Ie7b6be11a093ffa4006182bdc0b73018ba799246
This commit is contained in:
mpodolian
2024-10-07 10:21:11 -07:00
parent 644aad280b
commit 3dcb19f33a
4 changed files with 16 additions and 15 deletions
@@ -23,6 +23,7 @@ import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
import static com.android.launcher3.Utilities.isRtl;
import static com.android.launcher3.Utilities.mapRange;
import static com.android.launcher3.anim.AnimatedFloat.VALUE;
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
@@ -839,10 +840,10 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
int hotseatNavBarTranslationX = 0;
if (mCurrentBubbleBarLocation != null
&& taskbarDp.shouldAdjustHotseatOnBubblesLocationUpdate(mActivity)) {
boolean isBubblesOnLeft = mCurrentBubbleBarLocation.isOnLeft(
mTaskbarView.isLayoutRtl());
boolean isRtl = mTaskbarView.isLayoutRtl();
boolean isBubblesOnLeft = mCurrentBubbleBarLocation.isOnLeft(isRtl);
hotseatNavBarTranslationX = taskbarDp
.getHotseatTranslationXForBubbleBar(/* isNavbarOnRight = */ isBubblesOnLeft);
.getHotseatTranslationXForBubbleBar(isBubblesOnLeft, isRtl);
}
for (int i = 0; i < mTaskbarView.getChildCount(); i++) {
View child = mTaskbarView.getChildAt(i);