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

Commit f56bfaba authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Change Taskbar Window height logic for taskbar pinning." into main

parents 36a9c194 0dce287a
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_ALL;
import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
import static com.android.launcher3.AbstractFloatingView.TYPE_TASKBAR_OVERLAY_PROXY;
import static com.android.launcher3.Utilities.isRunningInTestHarness;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_PINNING;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_NO_RECREATION;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_FOLDER_OPEN;
import static com.android.launcher3.taskbar.TaskbarAutohideSuspendController.FLAG_AUTOHIDE_SUSPEND_DRAGGING;
@@ -843,9 +844,17 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
            return getSetupWindowHeight();
        }

        if (DisplayController.isTransientTaskbar(this)) {
            return mDeviceProfile.taskbarHeight
                    + (2 * mDeviceProfile.taskbarBottomMargin)
        boolean shouldTreatAsTransient = DisplayController.isTransientTaskbar(this)
                || (ENABLE_TASKBAR_PINNING.get() && !isThreeButtonNav());

        // Return transient taskbar window height when pinning feature is enabled, so taskbar view
        // does not get cut off during pinning animation.
        if (shouldTreatAsTransient) {
            DeviceProfile transientTaskbarDp = mDeviceProfile.toBuilder(this)
                    .setIsTransientTaskbar(true).build();

            return transientTaskbarDp.taskbarHeight
                    + (2 * transientTaskbarDp.taskbarBottomMargin)
                    + resources.getDimensionPixelSize(R.dimen.transient_taskbar_shadow_blur);
        }