Refactored hotseat translation X logic

Made retrieval of the hotseat translation X easier to use.

Test: Manual. Set the navigation mode to 3-button. Moved the bubble bar
from one side to the other. Switched the navigation mode to gestures.
Moved the bubble bar from one side to the other again.
Bug: 373422448
Flag: EXEMPT refactoring

Change-Id: Ie69f1ecf178244008e5c752882c4b91a30928756
This commit is contained in:
mpodolian
2024-10-16 16:26:30 -07:00
parent 9c5d8a2059
commit 1d4e75c777
5 changed files with 27 additions and 29 deletions
@@ -837,12 +837,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
int firstRecentTaskIndex = -1;
int hotseatNavBarTranslationX = 0;
if (mCurrentBubbleBarLocation != null
&& taskbarDp.shouldAdjustHotseatOnBubblesLocationUpdate(mActivity)) {
boolean isRtl = mTaskbarView.isLayoutRtl();
boolean isBubblesOnLeft = mCurrentBubbleBarLocation.isOnLeft(isRtl);
if (mCurrentBubbleBarLocation != null) {
boolean isBubblesOnLeft = mCurrentBubbleBarLocation
.isOnLeft(mTaskbarView.isLayoutRtl());
hotseatNavBarTranslationX = taskbarDp
.getHotseatTranslationXForBubbleBar(isBubblesOnLeft, isRtl);
.getHotseatTranslationXForNavBar(mActivity, isBubblesOnLeft);
}
for (int i = 0; i < mTaskbarView.getChildCount(); i++) {
View child = mTaskbarView.getChildAt(i);