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

Commit e5503c2b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add protolog for presentation" into main

parents a3b00840 2045b050
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -100,6 +100,8 @@ public enum WmProtoLogGroups implements IProtoLogGroup {
    WM_DEBUG_TPL(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM),
    WM_DEBUG_EMBEDDED_WINDOWS(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false,
            Consts.TAG_WM),
    WM_DEBUG_PRESENTATION(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false,
            Consts.TAG_WM),
    TEST_GROUP(true, true, false, "WindowManagerProtoLogTest");

    private final boolean mEnabled;
+8 −1
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@ import static com.android.window.flags.Flags.enablePresentationForConnectedDispl
import android.annotation.NonNull;
import android.util.IntArray;

import com.android.internal.protolog.ProtoLog;
import com.android.internal.protolog.WmProtoLogGroups;

/**
 * Manages presentation windows.
 */
@@ -50,7 +53,9 @@ class PresentationController {
        if (isPresenting(displayId)) {
            return;
        }
        mPresentingDisplayIds.add(displayId);
        ProtoLog.v(WmProtoLogGroups.WM_DEBUG_PRESENTATION, "Presentation added to display %d: %s",
                win.getDisplayId(), win);
        mPresentingDisplayIds.add(win.getDisplayId());
        if (enablePresentationForConnectedDisplays()) {
            // A presentation hides all activities behind on the same display.
            win.mDisplayContent.ensureActivitiesVisible(/*starting=*/ null,
@@ -64,6 +69,8 @@ class PresentationController {
        if (!isPresenting(displayId)) {
            return;
        }
        ProtoLog.v(WmProtoLogGroups.WM_DEBUG_PRESENTATION,
                "Presentation removed from display %d: %s", win.getDisplayId(), win);
        // TODO(b/393945496): Make sure that there's one presentation at most per display.
        final int displayIdIndex = mPresentingDisplayIds.indexOf(displayId);
        if (displayIdIndex != -1) {