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

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

Merge "Fix WM dump perfetto slice" into main

parents 73b73805 00e6e684
Loading
Loading
Loading
Loading
+30 −24
Original line number Diff line number Diff line
@@ -6810,11 +6810,14 @@ public class WindowManagerService extends IWindowManager.Stub
     * @param logLevel  Determines the amount of data to be written to the Protobuf.
     */
    void dumpDebugLocked(ProtoOutputStream proto, @WindowTracingLogLevel int logLevel) {
        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "dumpDebugLocked");
        try {
            mPolicy.dumpDebug(proto, POLICY);
            mRoot.dumpDebug(proto, ROOT_WINDOW_CONTAINER, logLevel);
            final DisplayContent topFocusedDisplayContent = mRoot.getTopFocusedDisplayContent();
            if (topFocusedDisplayContent.mCurrentFocus != null) {
            topFocusedDisplayContent.mCurrentFocus.writeIdentifierToProto(proto, FOCUSED_WINDOW);
                topFocusedDisplayContent.mCurrentFocus
                        .writeIdentifierToProto(proto, FOCUSED_WINDOW);
            }
            if (topFocusedDisplayContent.mFocusedApp != null) {
                topFocusedDisplayContent.mFocusedApp.writeNameToProto(proto, FOCUSED_APP);
@@ -6827,13 +6830,16 @@ public class WindowManagerService extends IWindowManager.Stub
            proto.write(FOCUSED_DISPLAY_ID, topFocusedDisplayContent.getDisplayId());
            proto.write(HARD_KEYBOARD_AVAILABLE, mHardKeyboardAvailable);

        // This is always true for now since we still update the window frames at the server side.
        // Once we move the window layout to the client side, this can be false when we are waiting
        // for the frames.
            // This is always true for now since we still update the window frames at the server
            // side. Once we move the window layout to the client side, this can be false when we
            // are waiting for the frames.
            proto.write(WINDOW_FRAMES_VALID, true);

            // Write the BackNavigationController's state into the protocol buffer
            mAtmService.mBackNavigationController.dumpDebug(proto, BACK_NAVIGATION);
        } finally {
            Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
        }
    }

    private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll,
+1 −6
Original line number Diff line number Diff line
@@ -167,12 +167,7 @@ abstract class WindowTracing {

            long token = os.start(WINDOW_MANAGER_SERVICE);
            synchronized (mGlobalLock) {
                Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "dumpDebugLocked");
                try {
                mService.dumpDebugLocked(os, logLevel);
                } finally {
                    Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
                }
            }
            os.end(token);
        } catch (Exception e) {