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

Commit 0ccbf14c authored by Toshiki Kikuchi's avatar Toshiki Kikuchi
Browse files

Fix taskbar visibility when default-to-desktop

This CL fixes the taskbar visibility when showLockedTaskbarOnHome is
enabled.
Ife336ebd57eb2f60c2bc33ed6a4527c42111808f wrongly assumes that the
taskbar is always invisible when the launcher is visible, so this CL
fixes the assumption.

Bug: 379870867
Bug: 379785901
Flag: EXEMPT bug fix
Test: manual
Change-Id: I9043898fb499520954ee3c5463ab28208d374875
parent eb28585e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.os.SystemClock;
import android.util.Log;
import android.view.animation.Interpolator;
@@ -581,7 +582,7 @@ public class TaskbarLauncherStateController {
        float backgroundAlpha = isInLauncher && isTaskbarAlignedWithHotseat() ? 0 : 1;
        AnimatedFloat taskbarBgOffset =
                mControllers.taskbarDragLayerController.getTaskbarBackgroundOffset();
        boolean showTaskbar = !isInLauncher || isInOverview;
        boolean showTaskbar = shouldShowTaskbar(mLauncher, isInLauncher, isInOverview);
        float taskbarBgOffsetEnd = showTaskbar ? 0f : 1f;
        float taskbarBgOffsetStart = showTaskbar ? 1f : 0f;

@@ -714,6 +715,14 @@ public class TaskbarLauncherStateController {
        return animatorSet;
    }

    private static boolean shouldShowTaskbar(Context context, boolean isInLauncher,
            boolean isInOverview) {
        if (DisplayController.showLockedTaskbarOnHome(context) && isInLauncher) {
            return true;
        }
        return !isInLauncher || isInOverview;
    }

    private void setupPinnedTaskbarAnimation(AnimatorSet animatorSet, boolean showTaskbar,
            AnimatedFloat taskbarBgOffset, float taskbarBgOffsetStart, float taskbarBgOffsetEnd,
            long duration, Animator taskbarBackgroundAlpha) {