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

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

Merge "Log metrics for dragging the header to top/sides" into main

parents 697f72ad 3dbee04b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -118,7 +118,13 @@ class DesktopModeUiEventLogger(
        @UiEvent(doc = "When user successfully drags the app handle to split screen")
        DESKTOP_WINDOW_APP_HANDLE_DRAG_TO_SPLIT_SCREEN(2003),
        @UiEvent(doc = "When user successfully drags the app handle to full screen")
        DESKTOP_WINDOW_APP_HANDLE_DRAG_TO_FULL_SCREEN(2004);
        DESKTOP_WINDOW_APP_HANDLE_DRAG_TO_FULL_SCREEN(2004),
        @UiEvent(doc = "Drag the window header to the top to switch to full screen mode")
        DESKTOP_WINDOW_APP_HEADER_DRAG_TO_FULL_SCREEN(2005),
        @UiEvent(doc = "Drag the window header to an edge to tile it to the left side")
        DESKTOP_WINDOW_APP_HEADER_DRAG_TO_TILE_TO_LEFT(2006),
        @UiEvent(doc = "Drag the window header to an edge to tile it to the right side")
        DESKTOP_WINDOW_APP_HEADER_DRAG_TO_TILE_TO_RIGHT(2007);

        override fun getId(): Int = mId
    }
+12 −0
Original line number Diff line number Diff line
@@ -2085,6 +2085,10 @@ class DesktopTasksController(
                if (DesktopModeStatus.shouldMaximizeWhenDragToTopEdge(context)) {
                    dragToMaximizeDesktopTask(taskInfo, taskSurface, currentDragBounds, motionEvent)
                } else {
                    desktopModeUiEventLogger.log(
                        taskInfo,
                        DesktopUiEventEnum.DESKTOP_WINDOW_APP_HEADER_DRAG_TO_FULL_SCREEN
                    )
                    moveToFullscreenWithAnimation(
                        taskInfo,
                        position,
@@ -2093,6 +2097,10 @@ class DesktopTasksController(
                }
            }
            IndicatorType.TO_SPLIT_LEFT_INDICATOR -> {
                desktopModeUiEventLogger.log(
                    taskInfo,
                    DesktopUiEventEnum.DESKTOP_WINDOW_APP_HEADER_DRAG_TO_TILE_TO_LEFT
                )
                handleSnapResizingTaskOnDrag(
                    taskInfo,
                    SnapPosition.LEFT,
@@ -2104,6 +2112,10 @@ class DesktopTasksController(
                )
            }
            IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> {
                desktopModeUiEventLogger.log(
                    taskInfo,
                    DesktopUiEventEnum.DESKTOP_WINDOW_APP_HEADER_DRAG_TO_TILE_TO_RIGHT
                )
                handleSnapResizingTaskOnDrag(
                    taskInfo,
                    SnapPosition.RIGHT,