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

Commit 2156164a authored by Yunfan Chen's avatar Yunfan Chen Committed by Android (Google) Code Review
Browse files

Merge "Dump WindowState to InsetsSourceProvider Proto" into main

parents d08c84e3 8be479c6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.view;

import static android.view.InsetsSourceProto.FRAME;
import static android.view.InsetsSourceProto.TYPE;
import static android.view.InsetsSourceProto.TYPE_NUMBER;
import static android.view.InsetsSourceProto.VISIBLE;
import static android.view.InsetsSourceProto.VISIBLE_FRAME;
import static android.view.WindowInsets.Type.captionBar;
@@ -352,6 +353,7 @@ public class InsetsSource implements Parcelable {
    public void dumpDebug(ProtoOutputStream proto, long fieldId) {
        final long token = proto.start(fieldId);
        proto.write(TYPE, WindowInsets.Type.toString(mType));
        proto.write(TYPE_NUMBER, mType);
        mFrame.dumpDebug(proto, FRAME);
        if (mVisibleFrame != null) {
            mVisibleFrame.dumpDebug(proto, VISIBLE_FRAME);
+1 −0
Original line number Diff line number Diff line
@@ -593,6 +593,7 @@ message InsetsSourceProviderProto {
    optional bool seamless_rotating = 13;
    optional int64 finish_seamless_rotate_frame_number = 14;
    optional bool controllable = 15;
    optional WindowStateProto source_window_state = 16;
}

message ImeInsetsSourceProviderProto {
+1 −0
Original line number Diff line number Diff line
@@ -30,4 +30,5 @@ message InsetsSourceProto {
    optional .android.graphics.RectProto frame = 2;
    optional .android.graphics.RectProto visible_frame = 3;
    optional bool visible = 4;
    optional int32 type_number = 5;
}
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import static com.android.server.wm.InsetsSourceProviderProto.PENDING_CONTROL_TA
import static com.android.server.wm.InsetsSourceProviderProto.SEAMLESS_ROTATING;
import static com.android.server.wm.InsetsSourceProviderProto.SERVER_VISIBLE;
import static com.android.server.wm.InsetsSourceProviderProto.SOURCE;
import static com.android.server.wm.InsetsSourceProviderProto.SOURCE_WINDOW_STATE;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_INSETS_CONTROL;

import android.annotation.NonNull;
@@ -680,6 +681,9 @@ class InsetsSourceProvider {
        proto.write(SERVER_VISIBLE, mServerVisible);
        proto.write(SEAMLESS_ROTATING, mSeamlessRotating);
        proto.write(CONTROLLABLE, mControllable);
        if (mWindowContainer != null && mWindowContainer.asWindowState() != null) {
            mWindowContainer.asWindowState().dumpDebug(proto, SOURCE_WINDOW_STATE, logLevel);
        }
        proto.end(token);
    }