desktop-exploded-view: Add some comments

This adds some comments in DesktopTaskViewModel. There are no semantic changes.

Flag: com.android.launcher3.enable_desktop_exploded_view
Test: N/A
Bug: 367353392
Change-Id: I484bf4d0f094c5b87716022ffcd3db85d8b85ef7
This commit is contained in:
Daniel Andersson
2025-02-06 16:14:50 -08:00
parent 4899bc2c80
commit 31191f8cee
@@ -22,9 +22,18 @@ import com.android.quickstep.recents.domain.usecase.OrganizeDesktopTasksUseCase
/** ViewModel used for [com.android.quickstep.views.DesktopTaskView]. */
class DesktopTaskViewModel(private val organizeDesktopTasksUseCase: OrganizeDesktopTasksUseCase) {
/** Positions for desktop tasks as calculated by [organizeDesktopTasksUseCase] */
var organizedDesktopTaskPositions = emptyList<DesktopTaskBoundsData>()
private set
/**
* Computes new task positions using [organizeDesktopTasksUseCase]. The result is stored in
* [organizedDesktopTaskPositions]. This is used for the exploded desktop view where the usecase
* will scale and translate tasks so that they don't overlap.
*
* @param desktopSize the size available for organizing the tasks.
* @param defaultPositions the tasks and their bounds as they appear on a desktop.
*/
fun organizeDesktopTasks(desktopSize: Size, defaultPositions: List<DesktopTaskBoundsData>) {
organizedDesktopTaskPositions =
organizeDesktopTasksUseCase.run(desktopSize, defaultPositions)