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

Commit d3693424 authored by Jon @'s avatar Jon @ Committed by Android (Google) Code Review
Browse files

Merge "Notify home is visible when launching a translucent app." into main

parents 82171512 26447ddc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
    /**
     * Should be called from onResume() and onPause(), and animates the Taskbar accordingly.
     */
    @Override
    public void onLauncherVisibilityChanged(boolean isVisible) {
        onLauncherVisibilityChanged(isVisible, false /* fromInit */);
    }
+9 −0
Original line number Diff line number Diff line
@@ -358,4 +358,13 @@ public class TaskbarUIController {

    /** Adjusts the hotseat for the bubble bar. */
    public void adjustHotseatForBubbleBar(boolean isBubbleBarVisible) {}

    /**
     * Adjusts the taskbar based on the visibility of the launcher.
     * @param isVisible True if launcher is visible, false otherwise.
     */
    public void onLauncherVisibilityChanged(boolean isVisible) {
        mControllers.taskbarStashController.updateStateForFlag(FLAG_IN_APP, !isVisible);
        mControllers.taskbarStashController.applyState();
    }
}
+16 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.statehandlers.DepthController;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.taskbar.TaskbarUIController;
import com.android.launcher3.util.DisplayController;
import com.android.quickstep.RemoteTargetGluer.RemoteTargetHandle;
import com.android.quickstep.util.MultiValueUpdateListener;
@@ -643,6 +644,21 @@ public final class TaskViewUtils {
                        recentsView.post(() -> {
                            stateManager.moveToRestState();
                            stateManager.reapplyState();

                            // We may have notified launcher is not visible so that taskbar can
                            // stash immediately. Now that the animation is over, we can update
                            // that launcher is still visible.
                            TaskbarUIController controller = recentsView.getSizeStrategy()
                                    .getTaskbarController();
                            if (controller != null) {
                                boolean launcherVisible = true;
                                for (RemoteAnimationTarget target : appTargets) {
                                    launcherVisible &= target.isTranslucent;
                                }
                                if (launcherVisible) {
                                    controller.onLauncherVisibilityChanged(true);
                                }
                            }
                        });
                    });
                }