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

Commit 23ba6b73 authored by mattsziklay's avatar mattsziklay
Browse files

Log UIEvent metrics for Multi Instance features.

Bug: 341319969
Test: m
Flag: com.android.window.flags.enable_desktop_windowing_multi_instance_features

Change-Id: I1b15bdea0c4fd4d40a25ae898003d56e2de0f77c
parent ac88b1f0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -145,7 +145,11 @@ class DesktopModeUiEventLogger(
        @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);
        DESKTOP_WINDOW_HEADER_TAP_TO_REFOCUS(2022),
        @UiEvent(doc = "Enter multi-instance by using the New Window button")
        DESKTOP_WINDOW_MULTI_INSTANCE_NEW_WINDOW_CLICK(2069),
        @UiEvent(doc = "Enter multi-instance by clicking an icon in the Manage Windows menu")
        DESKTOP_WINDOW_MULTI_INSTANCE_MANAGE_WINDOWS_ICON_CLICK(2070);

        override fun getId(): Int = mId
    }
+5 −0
Original line number Diff line number Diff line
@@ -783,6 +783,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
        }
        decoration.closeHandleMenu();
        mDesktopTasksController.openNewWindow(decoration.mTaskInfo);
        mDesktopModeUiEventLogger.log(decoration.mTaskInfo,
                DesktopUiEventEnum.DESKTOP_WINDOW_MULTI_INSTANCE_NEW_WINDOW_CLICK);
    }

    private void onManageWindows(DesktopModeWindowDecoration decoration) {
@@ -799,6 +801,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
                        decoration.closeManageWindowsMenu();
                        mDesktopTasksController.openInstance(decoration.mTaskInfo,
                                requestedTaskId);
                        mDesktopModeUiEventLogger.log(decoration.mTaskInfo,
                                DesktopUiEventEnum
                                        .DESKTOP_WINDOW_MULTI_INSTANCE_MANAGE_WINDOWS_ICON_CLICK);
                        return Unit.INSTANCE;
                    }
                )