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

Commit 1bb2962a authored by Jorge Gil's avatar Jorge Gil
Browse files

Log App Header move & refocus metrics

Fix: 341320112
Flag: EXEMPT adding metrics
Test: verified with go/atomtester
Change-Id: Ia2d4b8171e00c11bee1230c942e1699e698ed609
parent 81eca92f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -140,7 +140,11 @@ class DesktopModeUiEventLogger(
        @UiEvent(doc = "Tap on the tile to left option in the maximize button menu")
        DESKTOP_WINDOW_MAXIMIZE_BUTTON_MENU_TAP_TO_TILE_TO_LEFT(2012),
        @UiEvent(doc = "Tap on the tile to right option in the maximize button menu")
        DESKTOP_WINDOW_MAXIMIZE_BUTTON_MENU_TAP_TO_TILE_TO_RIGHT(2013);
        DESKTOP_WINDOW_MAXIMIZE_BUTTON_MENU_TAP_TO_TILE_TO_RIGHT(2013),
        @UiEvent(doc = "Moving the desktop window by dragging the header")
        DESKTOP_WINDOW_MOVE_BY_HEADER_DRAG(2021),
        @UiEvent(doc = "Double tap on the window header to refocus a desktop window")
        DESKTOP_WINDOW_HEADER_TAP_TO_REFOCUS(2022);

        override fun getId(): Int = mId
    }
+4 −0
Original line number Diff line number Diff line
@@ -1026,6 +1026,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,

        private void moveTaskToFront(RunningTaskInfo taskInfo) {
            if (!mFocusTransitionObserver.hasGlobalFocus(taskInfo)) {
                mDesktopModeUiEventLogger.log(taskInfo,
                        DesktopUiEventEnum.DESKTOP_WINDOW_HEADER_TAP_TO_REFOCUS);
                mDesktopTasksController.moveTaskToFront(taskInfo);
            }
        }
@@ -1128,6 +1130,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
                    if (!wasDragging) {
                        return false;
                    }
                    mDesktopModeUiEventLogger.log(taskInfo,
                            DesktopUiEventEnum.DESKTOP_WINDOW_MOVE_BY_HEADER_DRAG);
                    if (e.findPointerIndex(mDragPointerId) == -1) {
                        mDragPointerId = e.getPointerId(0);
                    }