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

Commit fa0da93f authored by Ben Lin's avatar Ben Lin
Browse files

Drag-to-Desktop transition: Allow home to be launched on ext. displays.

Bug: 407085295
Test: Manual drag down on ext. display
Test: ran CD smoke tests
Flag: com.android.window.flags.enable_bug_fixes_for_secondary_display
Change-Id: Ia359353ad6d12628024a5f63ab6cfb67a4a3e8cc
parent 542411bd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.view.Choreographer
import android.view.SurfaceControl
import android.view.SurfaceControl.Transaction
import android.view.WindowManager.TRANSIT_CLOSE
import android.window.DesktopExperienceFlags
import android.window.DesktopModeFlags
import android.window.DesktopModeFlags.ENABLE_DRAG_TO_DESKTOP_INCOMING_TRANSITIONS_BUGFIX
import android.window.TransitionInfo
@@ -142,6 +143,9 @@ sealed class DragToDesktopTransitionHandler(
                setSourceInfo(SourceInfo.TYPE_DESKTOP_ANIMATION, SystemClock.uptimeMillis())
                pendingIntentCreatorBackgroundActivityStartMode =
                    ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
                if (DesktopExperienceFlags.ENABLE_BUG_FIXES_FOR_SECONDARY_DISPLAY.isTrue) {
                    launchDisplayId = taskInfo.displayId
                }
            }
        // If we are launching home for a profile of a user, just use the [userId] of that user
        // instead of the [profileId] to create the context.