Created a helper method that calculates the hotseat icons shift X.
Moved out logic that computes the translation X for the hotseat icons. Fixes: 368379159 Test: Manual. Have the hotseat adjusted. Open any application from the hotseat bar. Go back to home. Flag: EXEMPT refactoring Change-Id: If9dfa70be537f87b075bd865e7f9c5cd1ae78f00
This commit is contained in:
1 parent
7153b179a9
commit
51e2bb31ed
4 files changed
+48
-34
No files matched your search
@@ -1108,15 +1108,10 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
|
||||
translationX += mDeviceProfile
|
||||
.getHotseatTranslationXForBubbleBar(isBubblesOnLeft, isRtl);
|
||||
}
|
||||
if (isBubbleBarEnabled() && hasBubbles()) {
|
||||
// TODO(368379159) : create a class to reuse computation logic
|
||||
float adjustedBorderSpace =
|
||||
mDeviceProfile.getHotseatAdjustedBorderSpaceForBubbleBar(this);
|
||||
if (Float.compare(adjustedBorderSpace, 0f) != 0) {
|
||||
float borderSpaceDelta = adjustedBorderSpace - mDeviceProfile.hotseatBorderSpace;
|
||||
translationX +=
|
||||
(int) (mDeviceProfile.iconSizePx + itemInfo.cellX * borderSpaceDelta);
|
||||
}
|
||||
if (isBubbleBarEnabled()
|
||||
&& mDeviceProfile.shouldAdjustHotseatForBubbleBar(getContext(), hasBubbles())) {
|
||||
translationX += (int) mDeviceProfile
|
||||
.getHotseatAdjustedTranslation(getContext(), itemInfo.cellX);
|
||||
}
|
||||
return translationX;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user