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

Commit 4822f8a0 authored by Gustav Sennton's avatar Gustav Sennton Committed by Android (Google) Code Review
Browse files

Merge "Mark home-launch as transient for drag-to-desktop transition." into main

parents 9aab53d8 e87ac08f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ import android.content.Intent
import android.content.Intent.FILL_IN_COMPONENT
import android.graphics.PointF
import android.graphics.Rect
import android.os.Bundle
import android.os.IBinder
import android.os.SystemClock
import android.os.SystemProperties
@@ -139,7 +138,11 @@ sealed class DragToDesktopTransitionHandler(
                taskUser,
            )
        val wct = WindowContainerTransaction()
        wct.sendPendingIntent(pendingIntent, launchHomeIntent, Bundle())
        // The app that is being dragged into desktop mode might cause new transitions, make this
        // launch transient to make sure those transitions can execute in parallel and thus won't
        // block the end-drag transition.
        val intentOptions = ActivityOptions.makeBasic().setTransientLaunch()
        wct.sendPendingIntent(pendingIntent, launchHomeIntent, intentOptions.toBundle())
        val startTransitionToken =
            transitions.startTransition(TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, wct, this)

+6 −2
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ import android.view.SurfaceControl;
import android.view.SurfaceControl.Transaction;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewRootImpl;
import android.view.WindowManager;
import android.window.DesktopModeFlags;
import android.window.TaskSnapshot;
@@ -972,8 +973,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
            }
            if (mInputManager != null
                    && !Flags.enableAccessibleCustomHeaders()) {
                ViewRootImpl viewRootImpl = v.getViewRootImpl();
                if (viewRootImpl != null) {
                    // Pilfer so that windows below receive cancellations for this gesture.
                mInputManager.pilferPointers(v.getViewRootImpl().getInputToken());
                    mInputManager.pilferPointers(viewRootImpl.getInputToken());
                }
            }
            if (isUpOrCancel) {
                // Gesture is finished, reset state.