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

Commit 310d180a authored by Graciela Wissen Putri's avatar Graciela Wissen Putri
Browse files

[2/n] Log desktop entry reasons from Launcher

Add transition source to SystemUiProxy.activateDesk so entry point into
desktop is known.

Flag: EXEMPT logging
Bug: 423560267
Test: manual
Change-Id: I435f8281cc9ea88ccd3f1b51629d3f4a9a14cffc
parent c98eb64a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ enum class DesktopModeTransitionSource : Parcelable {
    APP_HANDLE_MENU_BUTTON,
    /** Transitions that originated as a result of keyboard shortcuts. */
    KEYBOARD_SHORTCUT,
    /** Transitions that originated from Recents. */
    RECENTS,
    /** Transitions with source unknown. */
    UNKNOWN;

+3 −0
Original line number Diff line number Diff line
@@ -4179,6 +4179,7 @@ class DesktopTasksController(
        deskId: Int,
        remoteTransition: RemoteTransition? = null,
        taskIdToReorderToFront: Int? = null,
        transitionSource: DesktopModeTransitionSource = DesktopModeTransitionSource.UNKNOWN,
    ) =
        traceSection(
            Trace.TRACE_TAG_WINDOW_MANAGER,
@@ -5302,12 +5303,14 @@ class DesktopTasksController(
            deskId: Int,
            remoteTransition: RemoteTransition?,
            taskIdInFront: Int,
            transitionSource: DesktopModeTransitionSource,
        ) {
            executeRemoteCallWithTaskPermission(controller, "activateDesk") { c ->
                c.activateDesk(
                    deskId,
                    remoteTransition,
                    if (taskIdInFront != INVALID_TASK_ID) taskIdInFront else null,
                    transitionSource,
                )
            }
        }
+2 −1
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ interface IDesktopMode {
     * If [taskIdToReorderToFront] is a valid id (not [INVALID_TASK_ID]) and is already on the given
     * desk, bring it to the front.
     */
    oneway void activateDesk(int deskId, in RemoteTransition remoteTransition, int taskIdToReorderToFront);
    oneway void activateDesk(int deskId, in RemoteTransition remoteTransition,
            int taskIdToReorderToFront, in DesktopModeTransitionSource transitionSource);

    /** Removes the desk with the given `deskId`. */
    oneway void removeDesk(int deskId);