Merge "Refactored hotseat translation X logic" into main

This commit is contained in:
Mykola Podolian authored and Android (Google) Code Review committed 2024-10-17 23:23:08 +00:00
commit 42e6127c2b
5 files changed
+27 -29

No files matched your search

@@ -886,19 +886,18 @@ public class TaskbarLauncherStateController {
mBubbleBarLocation = location;
if (location == null) {
// bubble bar is not present, hence no location, resetting the hotseat
updateHotseatAndQsbTranslationX(0, animate);
updateHotseatAndQsbTranslationX(/* targetValue = */ 0, animate);
mBubbleBarLocation = null;
return;
}
DeviceProfile deviceProfile = mLauncher.getDeviceProfile();
if (!deviceProfile.shouldAdjustHotseatOnBubblesLocationUpdate(
if (!deviceProfile.shouldAdjustHotseatOnNavBarLocationUpdate(
mControllers.taskbarActivityContext)) {
return;
}
boolean isRtl = isRtl(mLauncher.getResources());
boolean isBubblesOnLeft = location.isOnLeft(isRtl);
boolean isBubblesOnLeft = location.isOnLeft(isRtl(mLauncher.getResources()));
int targetX = deviceProfile
.getHotseatTranslationXForBubbleBar(isBubblesOnLeft, isRtl);
.getHotseatTranslationXForNavBar(mLauncher, isBubblesOnLeft);
updateHotseatAndQsbTranslationX(targetX, animate);
}