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

Commit 834d336d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use CATEGORY_SECONDARY_HOME on CD during drag-to-desktop transition" into main

parents 9033d945 ce4b0f4b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.os.SystemClock
import android.os.SystemProperties
import android.os.UserHandle
import android.view.Choreographer
import android.view.Display.DEFAULT_DISPLAY
import android.view.SurfaceControl
import android.view.SurfaceControl.Transaction
import android.view.WindowManager.TRANSIT_CHANGE
@@ -96,7 +97,6 @@ sealed class DragToDesktopTransitionHandler(
) : TransitionHandler {

    protected val rectEvaluator = RectEvaluator(Rect())
    private val launchHomeIntent = Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)

    private lateinit var splitScreenController: SplitScreenController
    private var transitionState: TransitionState? = null
@@ -140,6 +140,14 @@ sealed class DragToDesktopTransitionHandler(
            return
        }

        val launchHomeIntent =
            Intent(Intent.ACTION_MAIN).apply {
                if (taskInfo.displayId != DEFAULT_DISPLAY) {
                    addCategory(Intent.CATEGORY_SECONDARY_HOME)
                } else {
                    addCategory(Intent.CATEGORY_HOME)
                }
            }
        val options =
            ActivityOptions.makeBasic().apply {
                setTransientLaunch()