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

Commit d297f339 authored by Ben Lin's avatar Ben Lin Committed by Android (Google) Code Review
Browse files

Merge changes I98f2a35b,I6bbbc795 into main

* changes:
  DMWindowDecor: Call layout again when we are finished with recents animation.
  Desktop -> Split: Don't set windowing mode changes on the wcts.
parents a30ee7fa 4a3c3260
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -970,7 +970,9 @@ class DesktopTasksController(
    fun onDesktopSplitSelectAnimComplete(taskInfo: RunningTaskInfo) {
        val wct = WindowContainerTransaction()
        wct.setBounds(taskInfo.token, Rect())
        if (!DesktopModeFlags.ENABLE_INPUT_LAYER_TRANSITION_FIX.isTrue) {
            wct.setWindowingMode(taskInfo.token, WINDOWING_MODE_UNDEFINED)
        }
        shellTaskOrganizer.applyTransaction(wct)
    }

+3 −1
Original line number Diff line number Diff line
@@ -353,7 +353,9 @@ sealed class DragToDesktopTransitionHandler(
            )
            splitScreenController.transitionHandler.onSplitToDesktop()
        }
        if (!DesktopModeFlags.ENABLE_INPUT_LAYER_TRANSITION_FIX.isTrue) {
            wct.setWindowingMode(taskInfo.token, WINDOWING_MODE_MULTI_WINDOW)
        }
        wct.setDensityDpi(taskInfo.token, context.resources.displayMetrics.densityDpi)
        splitScreenController.requestEnterSplitSelect(taskInfo, wct, splitPosition, taskBounds)
    }
+13 −0
Original line number Diff line number Diff line
@@ -665,6 +665,14 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
        mBgExecutor.execute(mLoadAppInfoRunnable);
    }

    /**
     * Does a relayout without any new changes.
     * This is used if other states have changed (e.g. {@link mIsRecentsTransitionRunning}.
     */
    private void relayout() {
        relayout(mTaskInfo, mHasGlobalFocus, mExclusionRegion);
    }

    private boolean showInputLayer() {
        if (!DesktopModeFlags.ENABLE_INPUT_LAYER_TRANSITION_FIX.isTrue()) {
            return isCaptionVisible();
@@ -1956,6 +1964,11 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
     */
    void setIsRecentsTransitionRunning(boolean isRecentsTransitionRunning) {
        mIsRecentsTransitionRunning = isRecentsTransitionRunning;
        // TODO (b/394791828): Remove this once we can remove the input layer.
        if (DesktopModeFlags.ENABLE_INPUT_LAYER_TRANSITION_FIX.isTrue()
                && !isRecentsTransitionRunning) {
            relayout();
        }
    }

    /**