blob: 71f33c75205c0f471c84e1e1e9e09294612d7ffd [file] [log] [blame]
Steven Timotiusaf03df62017-07-18 16:56:43 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Yi Jinc7f93072017-09-29 15:29:38 -070017syntax = "proto2";
Yi Jinbe6de302017-10-24 12:30:24 -070018
Vishnu Nair9a3e4062018-01-11 08:42:54 -080019import "frameworks/base/core/proto/android/app/statusbarmanager.proto";
20import "frameworks/base/core/proto/android/content/activityinfo.proto";
Wale Ogunwale0d5609b2017-09-13 05:55:07 -070021import "frameworks/base/core/proto/android/content/configuration.proto";
Steven Timotiusaf03df62017-07-18 16:56:43 -070022import "frameworks/base/core/proto/android/graphics/rect.proto";
Vishnu Nair04ab4392018-01-10 11:00:06 -080023import "frameworks/base/core/proto/android/server/appwindowthumbnail.proto";
24import "frameworks/base/core/proto/android/server/surfaceanimator.proto";
Vishnu Nair1d0fa072018-01-04 07:53:00 -080025import "frameworks/base/core/proto/android/view/displaycutout.proto";
Steven Timotiusaf03df62017-07-18 16:56:43 -070026import "frameworks/base/core/proto/android/view/displayinfo.proto";
Vishnu Nair9a3e4062018-01-11 08:42:54 -080027import "frameworks/base/core/proto/android/view/surface.proto";
Steven Timotiusaf03df62017-07-18 16:56:43 -070028import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
29
30package com.android.server.wm.proto;
31
32option java_multiple_files = true;
33
34message WindowManagerServiceProto {
Yi Jinc7f93072017-09-29 15:29:38 -070035 optional WindowManagerPolicyProto policy = 1;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -070036 /* window hierarchy root */
Yi Jinc7f93072017-09-29 15:29:38 -070037 optional RootWindowContainerProto root_window_container = 2;
38 optional IdentifierProto focused_window = 3;
39 optional string focused_app = 4;
40 optional IdentifierProto input_method_window = 5;
41 optional bool display_frozen = 6;
42 optional int32 rotation = 7;
43 optional int32 last_orientation = 8;
44 optional AppTransitionProto app_transition = 9;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -070045}
46
47/* represents DisplayContent */
48message RootWindowContainerProto {
Yi Jinc7f93072017-09-29 15:29:38 -070049 optional WindowContainerProto window_container = 1;
Steven Timotiusaf03df62017-07-18 16:56:43 -070050 repeated DisplayProto displays = 2;
51 /* window references in top down z order */
52 repeated IdentifierProto windows = 3;
Steven Timotiusaf03df62017-07-18 16:56:43 -070053}
54
Vishnu Nair9a3e4062018-01-11 08:42:54 -080055message BarControllerProto {
56 optional .android.app.StatusBarManagerProto.WindowState state = 1;
57 optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2;
58}
59
60message WindowOrientationListenerProto {
61 optional bool enabled = 1;
62 optional .android.view.SurfaceProto.Rotation rotation = 2;
63}
64
65message KeyguardServiceDelegateProto {
66 optional bool showing = 1;
67 optional bool occluded = 2;
68 optional bool secure = 3;
69 enum ScreenState {
70 SCREEN_STATE_OFF = 0;
71 SCREEN_STATE_TURNING_ON = 1;
72 SCREEN_STATE_ON = 2;
73 SCREEN_STATE_TURNING_OFF = 3;
74 }
75 optional ScreenState screen_state = 4;
76 enum InteractiveState {
77 INTERACTIVE_STATE_SLEEP = 0;
78 INTERACTIVE_STATE_WAKING = 1;
79 INTERACTIVE_STATE_AWAKE = 2;
80 INTERACTIVE_STATE_GOING_TO_SLEEP = 3;
81 }
82 optional InteractiveState interactive_state = 5;
83}
84
Steven Timotiusaf03df62017-07-18 16:56:43 -070085/* represents PhoneWindowManager */
86message WindowManagerPolicyProto {
Vishnu Nair9a3e4062018-01-11 08:42:54 -080087 optional int32 last_system_ui_flags = 1;
88 enum UserRotationMode {
89 USER_ROTATION_FREE = 0;
90 USER_ROTATION_LOCKED = 1;
91 }
92 optional UserRotationMode rotation_mode = 2;
93 optional .android.view.SurfaceProto.Rotation rotation = 3;
94 optional .android.content.ActivityInfoProto.ScreenOrientation orientation = 4;
95 optional bool screen_on_fully = 5;
96 optional bool keyguard_draw_complete = 6;
97 optional bool window_manager_draw_complete = 7;
98 optional string focused_app_token = 8;
99 optional IdentifierProto focused_window = 9;
100 optional IdentifierProto top_fullscreen_opaque_window = 10;
101 optional IdentifierProto top_fullscreen_opaque_or_dimming_window = 11;
102 optional bool keyguard_occluded = 12;
103 optional bool keyguard_occluded_changed = 13;
104 optional bool keyguard_occluded_pending = 14;
105 optional bool force_status_bar = 15;
106 optional bool force_status_bar_from_keyguard = 16;
107 optional BarControllerProto status_bar = 17;
108 optional BarControllerProto navigation_bar = 18;
109 optional WindowOrientationListenerProto orientation_listener = 19;
110 optional KeyguardServiceDelegateProto keyguard_delegate = 20;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700111}
112
113/* represents AppTransition */
114message AppTransitionProto {
115 enum AppState {
116 APP_STATE_IDLE = 0;
117 APP_STATE_READY = 1;
118 APP_STATE_RUNNING = 2;
119 APP_STATE_TIMEOUT = 3;
120 }
Yi Jinc7f93072017-09-29 15:29:38 -0700121 optional AppState app_transition_state = 1;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700122 /* definitions for constants found in {@link com.android.server.wm.AppTransition} */
123 enum TransitionType {
124 TRANSIT_NONE = 0;
125 TRANSIT_UNSET = -1;
126 TRANSIT_ACTIVITY_OPEN = 6;
127 TRANSIT_ACTIVITY_CLOSE = 7;
128 TRANSIT_TASK_OPEN = 8;
129 TRANSIT_TASK_CLOSE = 9;
130 TRANSIT_TASK_TO_FRONT = 10;
131 TRANSIT_TASK_TO_BACK = 11;
132 TRANSIT_WALLPAPER_CLOSE = 12;
133 TRANSIT_WALLPAPER_OPEN = 13;
134 TRANSIT_WALLPAPER_INTRA_OPEN = 14;
135 TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
136 TRANSIT_TASK_OPEN_BEHIND = 16;
137 TRANSIT_TASK_IN_PLACE = 17;
138 TRANSIT_ACTIVITY_RELAUNCH = 18;
139 TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
140 TRANSIT_KEYGUARD_GOING_AWAY = 20;
141 TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
142 TRANSIT_KEYGUARD_OCCLUDE = 22;
143 TRANSIT_KEYGUARD_UNOCCLUDE = 23;
144 }
Yi Jinc7f93072017-09-29 15:29:38 -0700145 optional TransitionType last_used_app_transition = 2;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700146}
147
148/* represents DisplayContent */
149message DisplayProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700150 optional WindowContainerProto window_container = 1;
151 optional int32 id = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700152 repeated StackProto stacks = 3;
Yi Jinc7f93072017-09-29 15:29:38 -0700153 optional DockedStackDividerControllerProto docked_stack_divider_controller = 4;
154 optional PinnedStackControllerProto pinned_stack_controller = 5;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700155 /* non app windows */
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700156 repeated WindowTokenProto above_app_windows = 6;
157 repeated WindowTokenProto below_app_windows = 7;
158 repeated WindowTokenProto ime_windows = 8;
Yi Jinc7f93072017-09-29 15:29:38 -0700159 optional int32 dpi = 9;
160 optional .android.view.DisplayInfoProto display_info = 10;
161 optional int32 rotation = 11;
162 optional ScreenRotationAnimationProto screen_rotation_animation = 12;
Wale Ogunwale828ff7e2017-11-14 01:01:29 +0000163 optional DisplayFramesProto display_frames = 13;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700164}
165
Wale Ogunwale828ff7e2017-11-14 01:01:29 +0000166/* represents DisplayFrames */
167message DisplayFramesProto {
168 optional .android.graphics.RectProto stable_bounds = 1;
169}
Steven Timotiusaf03df62017-07-18 16:56:43 -0700170
171/* represents DockedStackDividerController */
172message DockedStackDividerControllerProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700173 optional bool minimized_dock = 1;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700174}
175
176/* represents PinnedStackController */
177message PinnedStackControllerProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700178 optional .android.graphics.RectProto default_bounds = 1;
179 optional .android.graphics.RectProto movement_bounds = 2;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700180}
181
182/* represents TaskStack */
183message StackProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700184 optional WindowContainerProto window_container = 1;
185 optional int32 id = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700186 repeated TaskProto tasks = 3;
Yi Jinc7f93072017-09-29 15:29:38 -0700187 optional bool fills_parent = 4;
188 optional .android.graphics.RectProto bounds = 5;
189 optional bool animation_background_surface_is_dimming = 6;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800190 optional bool defer_removal = 7;
191 optional float minimize_amount = 8;
192 optional bool adjusted_for_ime = 9;
193 optional float adjust_ime_amount = 10;
194 optional float adjust_divider_amount = 11;
195 optional .android.graphics.RectProto adjusted_bounds = 12;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700196}
197
198/* represents Task */
199message TaskProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700200 optional WindowContainerProto window_container = 1;
201 optional int32 id = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700202 repeated AppWindowTokenProto app_window_tokens = 3;
Yi Jinc7f93072017-09-29 15:29:38 -0700203 optional bool fills_parent = 4;
204 optional .android.graphics.RectProto bounds = 5;
205 optional .android.graphics.RectProto temp_inset_bounds = 6;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800206 optional bool defer_removal = 7;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700207}
208
209/* represents AppWindowToken */
210message AppWindowTokenProto {
211 /* obtained from ActivityRecord */
Yi Jinc7f93072017-09-29 15:29:38 -0700212 optional string name = 1;
213 optional WindowTokenProto window_token = 2;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800214 optional bool last_surface_showing = 3;
215 optional bool is_waiting_for_transition_start = 4;
216 optional bool is_really_animating = 5;
217 optional AppWindowThumbnailProto thumbnail = 6;
218 optional bool fills_parent = 7;
219 optional bool app_stopped = 8;
220 optional bool hidden_requested = 9;
221 optional bool client_hidden = 10;
222 optional bool defer_hiding_client = 11;
223 optional bool reported_drawn = 12;
224 optional bool reported_visible = 13;
225 optional int32 num_interesting_windows = 14;
226 optional int32 num_drawn_windows = 15;
227 optional bool all_drawn = 16;
228 optional bool last_all_drawn = 17;
229 optional bool removed = 18;
230 optional IdentifierProto starting_window = 19;
231 optional bool starting_displayed = 20;
232 optional bool starting_moved = 21;
233 optional bool hidden_set_from_transferred_starting_window = 22;
234 repeated .android.graphics.RectProto frozen_bounds = 23;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700235}
236
237/* represents WindowToken */
238message WindowTokenProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700239 optional WindowContainerProto window_container = 1;
240 optional int32 hash_code = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700241 repeated WindowStateProto windows = 3;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800242 optional bool hidden = 4;
243 optional bool waiting_to_show = 5;
244 optional bool paused = 6;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700245}
246
247/* represents WindowState */
248message WindowStateProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700249 optional WindowContainerProto window_container = 1;
250 optional IdentifierProto identifier = 2;
251 optional int32 display_id = 3;
252 optional int32 stack_id = 4;
253 optional .android.view.WindowLayoutParamsProto attributes = 5;
254 optional .android.graphics.RectProto given_content_insets = 6;
255 optional .android.graphics.RectProto frame = 7;
256 optional .android.graphics.RectProto containing_frame = 8;
257 optional .android.graphics.RectProto parent_frame = 9;
258 optional .android.graphics.RectProto content_frame = 10;
259 optional .android.graphics.RectProto content_insets = 11;
260 optional .android.graphics.RectProto surface_insets = 12;
261 optional WindowStateAnimatorProto animator = 13;
262 optional bool animating_exit = 14;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700263 repeated WindowStateProto child_windows = 15;
Jorim Jaggi45be1c4c2017-12-15 18:44:43 +0100264 optional .android.graphics.RectProto surface_position = 16;
265 optional .android.graphics.RectProto shown_position = 17;
Vishnu Nair1d0fa072018-01-04 07:53:00 -0800266 optional int32 requested_width = 18;
267 optional int32 requested_height = 19;
268 optional int32 view_visibility = 20;
269 optional int32 system_ui_visibility = 21;
270 optional bool has_surface = 22;
271 optional bool is_ready_for_display = 23;
272 optional .android.graphics.RectProto display_frame = 24;
273 optional .android.graphics.RectProto overscan_frame = 25;
274 optional .android.graphics.RectProto visible_frame = 26;
275 optional .android.graphics.RectProto decor_frame = 27;
276 optional .android.graphics.RectProto outset_frame = 28;
277 optional .android.graphics.RectProto overscan_insets = 29;
278 optional .android.graphics.RectProto visible_insets = 30;
279 optional .android.graphics.RectProto stable_insets = 31;
280 optional .android.graphics.RectProto outsets = 32;
281 optional .android.view.DisplayCutoutProto cutout = 33;
282 optional bool remove_on_exit = 34;
283 optional bool destroying = 35;
284 optional bool removed = 36;
285 optional bool is_on_screen = 37;
286 optional bool is_visible = 38;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700287}
288
289message IdentifierProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700290 optional int32 hash_code = 1;
291 optional int32 user_id = 2;
292 optional string title = 3;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700293}
294
295/* represents WindowStateAnimator */
296message WindowStateAnimatorProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700297 optional .android.graphics.RectProto last_clip_rect = 1;
298 optional WindowSurfaceControllerProto surface = 2;
Vishnu Nair1d0fa072018-01-04 07:53:00 -0800299 enum DrawState {
300 NO_SURFACE = 0;
301 DRAW_PENDING = 1;
302 COMMIT_DRAW_PENDING = 2;
303 READY_TO_SHOW = 3;
304 HAS_DRAWN = 4;
305 }
306 optional DrawState draw_state = 3;
307 optional .android.graphics.RectProto system_decor_rect = 4;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700308}
309
310/* represents WindowSurfaceController */
311message WindowSurfaceControllerProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700312 optional bool shown = 1;
313 optional int32 layer = 2;
Steven Timotiusf2d68892017-08-28 17:00:01 -0700314}
315
316/* represents ScreenRotationAnimation */
317message ScreenRotationAnimationProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700318 optional bool started = 1;
319 optional bool animation_running = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700320}
321
322/* represents WindowContainer */
323message WindowContainerProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700324 optional ConfigurationContainerProto configuration_container = 1;
325 optional int32 orientation = 2;
Wale Ogunwaledf262f52017-12-07 18:17:12 -0800326 optional bool visible = 3;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800327 optional SurfaceAnimatorProto surface_animator = 4;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700328}
329
330/* represents ConfigurationContainer */
331message ConfigurationContainerProto {
Yi Jinc7f93072017-09-29 15:29:38 -0700332 optional .android.content.ConfigurationProto override_configuration = 1;
333 optional .android.content.ConfigurationProto full_configuration = 2;
334 optional .android.content.ConfigurationProto merged_override_configuration = 3;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700335}