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

Commit c19b5d32 authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Set windowing mode after animation on cancel transition." into udc-qpr-dev

parents 149c2ccf 2f6dccab
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.os.IBinder
import android.os.SystemProperties
import android.util.DisplayMetrics.DENSITY_DEFAULT
import android.view.SurfaceControl
import android.view.SurfaceControl.Transaction
import android.view.WindowManager.TRANSIT_CHANGE
import android.view.WindowManager.TRANSIT_NONE
import android.view.WindowManager.TRANSIT_OPEN
@@ -272,11 +273,19 @@ class DesktopTasksController(
            task.taskId
        )
        val wct = WindowContainerTransaction()
        addMoveToFullscreenChanges(wct, task)
        wct.setBounds(task.token, null)

        if (Transitions.ENABLE_SHELL_TRANSITIONS) {
            enterDesktopTaskTransitionHandler.startCancelMoveToDesktopMode(wct, position,
                    mOnAnimationFinishedCallback)
            enterDesktopTaskTransitionHandler.startCancelMoveToDesktopMode(
                wct, position) { t ->
                val callbackWCT = WindowContainerTransaction()
                visualIndicator?.releaseVisualIndicator(t)
                visualIndicator = null
                addMoveToFullscreenChanges(callbackWCT, task)
                shellTaskOrganizer.applyTransaction(callbackWCT)
            }
        } else {
            addMoveToFullscreenChanges(wct, task)
            shellTaskOrganizer.applyTransaction(wct)
            releaseVisualIndicator()
        }
+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.wm.shell.desktopmode;

import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -200,7 +199,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition
        }

        if (type == Transitions.TRANSIT_CANCEL_ENTERING_DESKTOP_MODE
                && taskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
                && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM
                && mPosition != null) {
            // This Transition animates a task to fullscreen after being dragged from the status
            // bar and then released back into the status bar area