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

Commit dd8d8be3 authored by Charles Tsai's avatar Charles Tsai
Browse files

Expose state of ignoring orientation

To support state retrieval of ignoring orientation request in
a specific display area, we have to extend capability of protocol
buffer to expose such information.

This change revises WMS's protobuf definition to reach the goal.

Bug: 234669107
Test: atest android.server.wm.AppConfigurationTests
      atest android.dpi.cts.ConfigurationScreenLayoutTest
      atest android.view.cts.AttachedSurfaceControlTest

Change-Id: I8cd658283bd90fb6a4f8c55d7a60e7e7e9202195
parent 770e6897
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ message DisplayAreaProto {
    optional bool is_root_display_area = 5;
    optional int32 feature_id = 6;
    optional bool is_organized = 7;
    optional bool is_ignoring_orientation_request = 8;
}

/* represents a generic child of a DisplayArea */
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import static android.window.DisplayAreaOrganizer.FEATURE_WINDOW_TOKENS;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ORIENTATION;
import static com.android.internal.util.Preconditions.checkState;
import static com.android.server.wm.DisplayAreaProto.FEATURE_ID;
import static com.android.server.wm.DisplayAreaProto.IS_IGNORING_ORIENTATION_REQUEST;
import static com.android.server.wm.DisplayAreaProto.IS_ORGANIZED;
import static com.android.server.wm.DisplayAreaProto.IS_ROOT_DISPLAY_AREA;
import static com.android.server.wm.DisplayAreaProto.IS_TASK_DISPLAY_AREA;
@@ -291,6 +292,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {
        proto.write(IS_ROOT_DISPLAY_AREA, asRootDisplayArea() != null);
        proto.write(FEATURE_ID, mFeatureId);
        proto.write(IS_ORGANIZED, isOrganized());
        proto.write(IS_IGNORING_ORIENTATION_REQUEST, getIgnoreOrientationRequest());
        proto.end(token);
    }