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:
@@ -23,7 +23,6 @@ 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;
|
||||
@@ -938,10 +937,12 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
mTaskbarView.isDividerForRecents(), recentTaskIndex);
|
||||
if (positionInHotseat == ERROR_POSITION_IN_HOTSEAT_NOT_FOUND) continue;
|
||||
|
||||
float hotseatAdjustedBorderSpace =
|
||||
launcherDp.getHotseatAdjustedBorderSpaceForBubbleBar(child.getContext());
|
||||
|
||||
float hotseatIconCenter;
|
||||
if (bubbleBarHasBubbles() && hotseatAdjustedBorderSpace != 0) {
|
||||
if (launcherDp.shouldAdjustHotseatForBubbleBar(child.getContext(),
|
||||
bubbleBarHasBubbles())) {
|
||||
float hotseatAdjustedBorderSpace =
|
||||
launcherDp.getHotseatAdjustedBorderSpaceForBubbleBar(child.getContext());
|
||||
hotseatIconCenter = hotseatPadding.left + hotseatCellSize
|
||||
+ (hotseatCellSize + hotseatAdjustedBorderSpace) * positionInHotseat
|
||||
+ hotseatCellSize / 2f;
|
||||
|
||||
Reference in New Issue
Block a user