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

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

Merge "Set density to DENSITY_DPI_UNDEFINED for display connection events." into main

parents 62276e5f f6b4704c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.app.WindowConfiguration.WindowingMode
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.graphics.Point
import android.graphics.PointF
import android.graphics.Rect
@@ -861,7 +862,6 @@ class DesktopTasksController(
                    deskIds,
                    disconnectedDisplayId,
                    destinationDisplayId,
                    destDisplayLayout,
                    userId,
                )
            }
@@ -974,7 +974,6 @@ class DesktopTasksController(
        deskIds: List<Int>,
        disconnectedDisplayId: Int,
        destinationDisplayId: Int,
        destDisplayLayout: DisplayLayout?,
        userId: Int,
    ) {
        logD("handleProjectedModeDisconnect: moving tasks to non-desktop display")
@@ -1036,7 +1035,6 @@ class DesktopTasksController(
        val activeDeskId = repository.getPreservedActiveDesk(uniqueDisplayId)
        val wct = WindowContainerTransaction()
        var runOnTransitStartList = mutableListOf<RunOnTransitStart>()
        val destDisplayLayout = displayController.getDisplayLayout(displayId) ?: return
        val tilingReconnectHandler =
            TilingDisplayReconnectEventHandler(repository, snapEventHandler, transitions, displayId)
        val excludedTasks =
@@ -1072,7 +1070,6 @@ class DesktopTasksController(
                    if (!excludedTasks.contains(taskId)) {
                        addRestoreTaskToDeskChanges(
                                wct = wct,
                                destinationDisplayLayout = destDisplayLayout,
                                deskId = newDeskId,
                                taskId = taskId,
                                userId = userId,
@@ -1109,7 +1106,6 @@ class DesktopTasksController(

    private fun addRestoreTaskToDeskChanges(
        wct: WindowContainerTransaction,
        destinationDisplayLayout: DisplayLayout,
        deskId: Int,
        taskId: Int,
        userId: Int,
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED
import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
import android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED
import android.app.WindowConfiguration.windowingModeToString
import android.content.res.Configuration
import android.os.Trace
import android.util.SparseArray
import android.view.SurfaceControl
@@ -213,6 +214,8 @@ class RootTaskDesksOrganizer(
        // to prevent this when the changes merge.
        wct.setWindowingMode(root.token, WINDOWING_MODE_FREEFORM)
        wct.setWindowingMode(minimizationRoot.token, WINDOWING_MODE_FREEFORM)
        wct.setDensityDpi(root.token, Configuration.DENSITY_DPI_UNDEFINED)
        wct.setDensityDpi(minimizationRoot.token, Configuration.DENSITY_DPI_UNDEFINED)
    }

    override fun activateDesk(wct: WindowContainerTransaction, deskId: Int, skipReorder: Boolean) {