Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f78e23c authored by Tony Wickham's avatar Tony Wickham
Browse files

Don't scale/translate hotseat icons if they are visible in overview

Bug: 129145824
Change-Id: I02af7ad21b6dbc46041e774dfc6f5d3efb0ab8a9
parent 9bbbe9cc
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@ package com.android.launcher3.uioverrides.states;

import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.logging.LoggerUtils.getTargetStr;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;

@@ -27,7 +25,6 @@ import android.view.View;

import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
@@ -73,6 +70,15 @@ public class OverviewState extends LauncherState {
        return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor);
    }

    @Override
    public ScaleAndTranslation getHotseatScaleAndTranslation(Launcher launcher) {
        if ((getVisibleElements(launcher) & HOTSEAT_ICONS) != 0) {
            // If the hotseat icons are visible in overview, keep them in their normal position.
            return super.getWorkspaceScaleAndTranslation(launcher);
        }
        return getWorkspaceScaleAndTranslation(launcher);
    }

    @Override
    public ScaleAndTranslation getOverviewScaleAndTranslation(Launcher launcher) {
        return new ScaleAndTranslation(1f, 0f, 0f);
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ public class FlingAndHoldTouchController extends PortraitStatesTouchController {

            AnimatorSetBuilder builder = new AnimatorSetBuilder();
            builder.setInterpolator(AnimatorSetBuilder.ANIM_VERTICAL_PROGRESS, OVERSHOOT_1_2);
            builder.setInterpolator(AnimatorSetBuilder.ANIM_WORKSPACE_TRANSLATE, OVERSHOOT_1_2);
            AnimatorSet overviewAnim = mLauncher.getStateManager().createAtomicAnimation(
                    NORMAL, OVERVIEW, builder, ANIM_ALL, ATOMIC_DURATION);
            overviewAnim.addListener(new AnimatorListenerAdapter() {
+6 −2
Original line number Diff line number Diff line
@@ -320,8 +320,12 @@ public class LauncherStateManager {
            if (!isWorkspaceVisible) {
                workspace.setScaleX(0.92f);
                workspace.setScaleY(0.92f);
                workspace.getHotseat().setScaleX(0.92f);
                workspace.getHotseat().setScaleY(0.92f);
            }
            Hotseat hotseat = workspace.getHotseat();
            boolean isHotseatVisible = hotseat.getVisibility() == VISIBLE && hotseat.getAlpha() > 0;
            if (!isHotseatVisible) {
                hotseat.setScaleX(0.92f);
                hotseat.setScaleY(0.92f);
            }
        } else if (fromState == NORMAL && toState == OVERVIEW_PEEK) {
            builder.setInterpolator(ANIM_OVERVIEW_FADE, INSTANT);