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

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

Merge "Launch the home task as user." into main

parents 39d38ede 764c8ab6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1486,6 +1486,7 @@ class DesktopTasksController(
    }

    private fun addLaunchHomePendingIntent(wct: WindowContainerTransaction, displayId: Int) {
        val userHandle = UserHandle.of(userId)
        val launchHomeIntent =
            Intent(Intent.ACTION_MAIN).apply {
                if (displayId != DEFAULT_DISPLAY) {
@@ -1501,11 +1502,13 @@ class DesktopTasksController(
                    ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
            }
        val pendingIntent =
            PendingIntent.getActivity(
            PendingIntent.getActivityAsUser(
                context,
                /* requestCode= */ 0,
                launchHomeIntent,
                PendingIntent.FLAG_IMMUTABLE,
                /* options= */ null,
                userHandle,
            )
        wct.sendPendingIntent(pendingIntent, launchHomeIntent, options.toBundle())
    }