Merge "Refactored hotseat translation X logic" into main
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user