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

Commit 26d41d04 authored by Louis Chang's avatar Louis Chang
Browse files

Adding event logs for embedded TF creation and removal

For easier analyzing the issue from the logs.

Bug: 341842558
Test: wm presubmit
Change-Id: I3deb4ef0da6342de71e89c13e3057497e9cb8cd6
parent 18bc6e82
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ option java_package com.android.server.wm
31002 wm_task_moved (TaskId|1|5),(Root Task ID|1|5),(Display Id|1|5),(ToTop|1),(Index|1)
# Task removed with source explanation.
31003 wm_task_removed (TaskId|1|5),(Root Task ID|1|5),(Display Id|1|5),(Reason|3)
# Embedded TaskFragment created
31004 wm_tf_created (Token|1|5),(TaskId|1|5)
# Embedded TaskFragment removed
31005 wm_tf_removed (Token|1|5),(TaskId|1|5)

# Set the requested orientation of an activity.
31006 wm_set_requested_orientation (Orientation|1|5),(Component Name|3)
+3 −0
Original line number Diff line number Diff line
@@ -2999,6 +2999,9 @@ class TaskFragment extends WindowContainer<WindowContainer> {

    @Override
    void removeImmediately() {
        if (asTask() == null) {
            EventLogTags.writeWmTfRemoved(System.identityHashCode(this), getTaskId());
        }
        mIsRemovalRequested = false;
        resetAdjacentTaskFragment();
        cleanUpEmbeddedTaskFragment();
+1 −0
Original line number Diff line number Diff line
@@ -2361,6 +2361,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
            position = POSITION_TOP;
        }
        ownerTask.addChild(taskFragment, position);
        EventLogTags.writeWmTfCreated(System.identityHashCode(taskFragment), ownerTask.mTaskId);
        taskFragment.setWindowingMode(creationParams.getWindowingMode());
        if (!creationParams.getInitialRelativeBounds().isEmpty()) {
            // The surface operations for the task fragment should sync with the transition.