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

Commit 3dbee04b authored by Jorge Gil's avatar Jorge Gil
Browse files

Log metrics for dragging the header to top/sides

Bug: 341320112
Flag: EXEMPT adding logs
Test: verified logs with go/atomtester
Change-Id: Ifd9bfc56fad26d43609cd650c91604a91c8734a9
parent d1311726
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
@@ -2029,6 +2029,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,
@@ -2037,6 +2041,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,
@@ -2048,6 +2056,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,