blob: c11058a2210729487e642d7c5b0be98d71709ea4 [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";
Yi Jin0d7bc2d12018-01-23 17:35:19 -080029import "frameworks/base/libs/incident/proto/android/privacy.proto";
Steven Timotiusaf03df62017-07-18 16:56:43 -070030
31package com.android.server.wm.proto;
32
33option java_multiple_files = true;
34
35message WindowManagerServiceProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080036 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
37
Yi Jinc7f93072017-09-29 15:29:38 -070038 optional WindowManagerPolicyProto policy = 1;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -070039 /* window hierarchy root */
Yi Jinc7f93072017-09-29 15:29:38 -070040 optional RootWindowContainerProto root_window_container = 2;
41 optional IdentifierProto focused_window = 3;
42 optional string focused_app = 4;
43 optional IdentifierProto input_method_window = 5;
44 optional bool display_frozen = 6;
45 optional int32 rotation = 7;
46 optional int32 last_orientation = 8;
47 optional AppTransitionProto app_transition = 9;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -070048}
49
50/* represents DisplayContent */
51message RootWindowContainerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080052 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
53
Yi Jinc7f93072017-09-29 15:29:38 -070054 optional WindowContainerProto window_container = 1;
Steven Timotiusaf03df62017-07-18 16:56:43 -070055 repeated DisplayProto displays = 2;
56 /* window references in top down z order */
57 repeated IdentifierProto windows = 3;
Steven Timotiusaf03df62017-07-18 16:56:43 -070058}
59
Vishnu Nair9a3e4062018-01-11 08:42:54 -080060message BarControllerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080061 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
62
Vishnu Nair9a3e4062018-01-11 08:42:54 -080063 optional .android.app.StatusBarManagerProto.WindowState state = 1;
64 optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2;
65}
66
67message WindowOrientationListenerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080068 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
69
Vishnu Nair9a3e4062018-01-11 08:42:54 -080070 optional bool enabled = 1;
71 optional .android.view.SurfaceProto.Rotation rotation = 2;
72}
73
74message KeyguardServiceDelegateProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080075 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
76
Vishnu Nair9a3e4062018-01-11 08:42:54 -080077 optional bool showing = 1;
78 optional bool occluded = 2;
79 optional bool secure = 3;
80 enum ScreenState {
81 SCREEN_STATE_OFF = 0;
82 SCREEN_STATE_TURNING_ON = 1;
83 SCREEN_STATE_ON = 2;
84 SCREEN_STATE_TURNING_OFF = 3;
85 }
86 optional ScreenState screen_state = 4;
87 enum InteractiveState {
88 INTERACTIVE_STATE_SLEEP = 0;
89 INTERACTIVE_STATE_WAKING = 1;
90 INTERACTIVE_STATE_AWAKE = 2;
91 INTERACTIVE_STATE_GOING_TO_SLEEP = 3;
92 }
93 optional InteractiveState interactive_state = 5;
94}
95
Steven Timotiusaf03df62017-07-18 16:56:43 -070096/* represents PhoneWindowManager */
97message WindowManagerPolicyProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080098 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
99
Vishnu Nair9a3e4062018-01-11 08:42:54 -0800100 optional int32 last_system_ui_flags = 1;
101 enum UserRotationMode {
102 USER_ROTATION_FREE = 0;
103 USER_ROTATION_LOCKED = 1;
104 }
105 optional UserRotationMode rotation_mode = 2;
106 optional .android.view.SurfaceProto.Rotation rotation = 3;
107 optional .android.content.ActivityInfoProto.ScreenOrientation orientation = 4;
108 optional bool screen_on_fully = 5;
109 optional bool keyguard_draw_complete = 6;
110 optional bool window_manager_draw_complete = 7;
111 optional string focused_app_token = 8;
112 optional IdentifierProto focused_window = 9;
113 optional IdentifierProto top_fullscreen_opaque_window = 10;
114 optional IdentifierProto top_fullscreen_opaque_or_dimming_window = 11;
115 optional bool keyguard_occluded = 12;
116 optional bool keyguard_occluded_changed = 13;
117 optional bool keyguard_occluded_pending = 14;
118 optional bool force_status_bar = 15;
119 optional bool force_status_bar_from_keyguard = 16;
120 optional BarControllerProto status_bar = 17;
121 optional BarControllerProto navigation_bar = 18;
122 optional WindowOrientationListenerProto orientation_listener = 19;
123 optional KeyguardServiceDelegateProto keyguard_delegate = 20;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700124}
125
126/* represents AppTransition */
127message AppTransitionProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800128 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
129
Steven Timotiusaf03df62017-07-18 16:56:43 -0700130 enum AppState {
131 APP_STATE_IDLE = 0;
132 APP_STATE_READY = 1;
133 APP_STATE_RUNNING = 2;
134 APP_STATE_TIMEOUT = 3;
135 }
Yi Jinc7f93072017-09-29 15:29:38 -0700136 optional AppState app_transition_state = 1;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700137 /* definitions for constants found in {@link com.android.server.wm.AppTransition} */
138 enum TransitionType {
139 TRANSIT_NONE = 0;
140 TRANSIT_UNSET = -1;
141 TRANSIT_ACTIVITY_OPEN = 6;
142 TRANSIT_ACTIVITY_CLOSE = 7;
143 TRANSIT_TASK_OPEN = 8;
144 TRANSIT_TASK_CLOSE = 9;
145 TRANSIT_TASK_TO_FRONT = 10;
146 TRANSIT_TASK_TO_BACK = 11;
147 TRANSIT_WALLPAPER_CLOSE = 12;
148 TRANSIT_WALLPAPER_OPEN = 13;
149 TRANSIT_WALLPAPER_INTRA_OPEN = 14;
150 TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
151 TRANSIT_TASK_OPEN_BEHIND = 16;
152 TRANSIT_TASK_IN_PLACE = 17;
153 TRANSIT_ACTIVITY_RELAUNCH = 18;
154 TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
155 TRANSIT_KEYGUARD_GOING_AWAY = 20;
156 TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
157 TRANSIT_KEYGUARD_OCCLUDE = 22;
158 TRANSIT_KEYGUARD_UNOCCLUDE = 23;
159 }
Yi Jinc7f93072017-09-29 15:29:38 -0700160 optional TransitionType last_used_app_transition = 2;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700161}
162
163/* represents DisplayContent */
164message DisplayProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800165 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
166
Yi Jinc7f93072017-09-29 15:29:38 -0700167 optional WindowContainerProto window_container = 1;
168 optional int32 id = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700169 repeated StackProto stacks = 3;
Yi Jinc7f93072017-09-29 15:29:38 -0700170 optional DockedStackDividerControllerProto docked_stack_divider_controller = 4;
171 optional PinnedStackControllerProto pinned_stack_controller = 5;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700172 /* non app windows */
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700173 repeated WindowTokenProto above_app_windows = 6;
174 repeated WindowTokenProto below_app_windows = 7;
175 repeated WindowTokenProto ime_windows = 8;
Yi Jinc7f93072017-09-29 15:29:38 -0700176 optional int32 dpi = 9;
177 optional .android.view.DisplayInfoProto display_info = 10;
178 optional int32 rotation = 11;
179 optional ScreenRotationAnimationProto screen_rotation_animation = 12;
Wale Ogunwale828ff7e2017-11-14 01:01:29 +0000180 optional DisplayFramesProto display_frames = 13;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700181}
182
Wale Ogunwale828ff7e2017-11-14 01:01:29 +0000183/* represents DisplayFrames */
184message DisplayFramesProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800185 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
186
Wale Ogunwale828ff7e2017-11-14 01:01:29 +0000187 optional .android.graphics.RectProto stable_bounds = 1;
188}
Steven Timotiusaf03df62017-07-18 16:56:43 -0700189
190/* represents DockedStackDividerController */
191message DockedStackDividerControllerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800192 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
193
Yi Jinc7f93072017-09-29 15:29:38 -0700194 optional bool minimized_dock = 1;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700195}
196
197/* represents PinnedStackController */
198message PinnedStackControllerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800199 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
200
Yi Jinc7f93072017-09-29 15:29:38 -0700201 optional .android.graphics.RectProto default_bounds = 1;
202 optional .android.graphics.RectProto movement_bounds = 2;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700203}
204
205/* represents TaskStack */
206message StackProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800207 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
208
Yi Jinc7f93072017-09-29 15:29:38 -0700209 optional WindowContainerProto window_container = 1;
210 optional int32 id = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700211 repeated TaskProto tasks = 3;
Yi Jinc7f93072017-09-29 15:29:38 -0700212 optional bool fills_parent = 4;
213 optional .android.graphics.RectProto bounds = 5;
214 optional bool animation_background_surface_is_dimming = 6;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800215 optional bool defer_removal = 7;
216 optional float minimize_amount = 8;
217 optional bool adjusted_for_ime = 9;
218 optional float adjust_ime_amount = 10;
219 optional float adjust_divider_amount = 11;
220 optional .android.graphics.RectProto adjusted_bounds = 12;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700221}
222
223/* represents Task */
224message TaskProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800225 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
226
Yi Jinc7f93072017-09-29 15:29:38 -0700227 optional WindowContainerProto window_container = 1;
228 optional int32 id = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700229 repeated AppWindowTokenProto app_window_tokens = 3;
Yi Jinc7f93072017-09-29 15:29:38 -0700230 optional bool fills_parent = 4;
231 optional .android.graphics.RectProto bounds = 5;
232 optional .android.graphics.RectProto temp_inset_bounds = 6;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800233 optional bool defer_removal = 7;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700234}
235
236/* represents AppWindowToken */
237message AppWindowTokenProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800238 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
239
Steven Timotiusaf03df62017-07-18 16:56:43 -0700240 /* obtained from ActivityRecord */
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800241 optional string name = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
Yi Jinc7f93072017-09-29 15:29:38 -0700242 optional WindowTokenProto window_token = 2;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800243 optional bool last_surface_showing = 3;
244 optional bool is_waiting_for_transition_start = 4;
245 optional bool is_really_animating = 5;
246 optional AppWindowThumbnailProto thumbnail = 6;
247 optional bool fills_parent = 7;
248 optional bool app_stopped = 8;
249 optional bool hidden_requested = 9;
250 optional bool client_hidden = 10;
251 optional bool defer_hiding_client = 11;
252 optional bool reported_drawn = 12;
253 optional bool reported_visible = 13;
254 optional int32 num_interesting_windows = 14;
255 optional int32 num_drawn_windows = 15;
256 optional bool all_drawn = 16;
257 optional bool last_all_drawn = 17;
258 optional bool removed = 18;
259 optional IdentifierProto starting_window = 19;
260 optional bool starting_displayed = 20;
261 optional bool starting_moved = 21;
262 optional bool hidden_set_from_transferred_starting_window = 22;
263 repeated .android.graphics.RectProto frozen_bounds = 23;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700264}
265
266/* represents WindowToken */
267message WindowTokenProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800268 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
269
Yi Jinc7f93072017-09-29 15:29:38 -0700270 optional WindowContainerProto window_container = 1;
271 optional int32 hash_code = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700272 repeated WindowStateProto windows = 3;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800273 optional bool hidden = 4;
274 optional bool waiting_to_show = 5;
275 optional bool paused = 6;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700276}
277
278/* represents WindowState */
279message WindowStateProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800280 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
281
Yi Jinc7f93072017-09-29 15:29:38 -0700282 optional WindowContainerProto window_container = 1;
283 optional IdentifierProto identifier = 2;
284 optional int32 display_id = 3;
285 optional int32 stack_id = 4;
286 optional .android.view.WindowLayoutParamsProto attributes = 5;
287 optional .android.graphics.RectProto given_content_insets = 6;
288 optional .android.graphics.RectProto frame = 7;
289 optional .android.graphics.RectProto containing_frame = 8;
290 optional .android.graphics.RectProto parent_frame = 9;
291 optional .android.graphics.RectProto content_frame = 10;
292 optional .android.graphics.RectProto content_insets = 11;
293 optional .android.graphics.RectProto surface_insets = 12;
294 optional WindowStateAnimatorProto animator = 13;
295 optional bool animating_exit = 14;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700296 repeated WindowStateProto child_windows = 15;
Jorim Jaggi45be1c4c2017-12-15 18:44:43 +0100297 optional .android.graphics.RectProto surface_position = 16;
298 optional .android.graphics.RectProto shown_position = 17;
Vishnu Nair1d0fa072018-01-04 07:53:00 -0800299 optional int32 requested_width = 18;
300 optional int32 requested_height = 19;
301 optional int32 view_visibility = 20;
302 optional int32 system_ui_visibility = 21;
303 optional bool has_surface = 22;
304 optional bool is_ready_for_display = 23;
305 optional .android.graphics.RectProto display_frame = 24;
306 optional .android.graphics.RectProto overscan_frame = 25;
307 optional .android.graphics.RectProto visible_frame = 26;
308 optional .android.graphics.RectProto decor_frame = 27;
309 optional .android.graphics.RectProto outset_frame = 28;
310 optional .android.graphics.RectProto overscan_insets = 29;
311 optional .android.graphics.RectProto visible_insets = 30;
312 optional .android.graphics.RectProto stable_insets = 31;
313 optional .android.graphics.RectProto outsets = 32;
314 optional .android.view.DisplayCutoutProto cutout = 33;
315 optional bool remove_on_exit = 34;
316 optional bool destroying = 35;
317 optional bool removed = 36;
318 optional bool is_on_screen = 37;
319 optional bool is_visible = 38;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700320}
321
322message IdentifierProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800323 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
324
Yi Jinc7f93072017-09-29 15:29:38 -0700325 optional int32 hash_code = 1;
326 optional int32 user_id = 2;
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800327 optional string title = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
Steven Timotiusaf03df62017-07-18 16:56:43 -0700328}
329
330/* represents WindowStateAnimator */
331message WindowStateAnimatorProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800332 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
333
Yi Jinc7f93072017-09-29 15:29:38 -0700334 optional .android.graphics.RectProto last_clip_rect = 1;
335 optional WindowSurfaceControllerProto surface = 2;
Vishnu Nair1d0fa072018-01-04 07:53:00 -0800336 enum DrawState {
337 NO_SURFACE = 0;
338 DRAW_PENDING = 1;
339 COMMIT_DRAW_PENDING = 2;
340 READY_TO_SHOW = 3;
341 HAS_DRAWN = 4;
342 }
343 optional DrawState draw_state = 3;
344 optional .android.graphics.RectProto system_decor_rect = 4;
Steven Timotiusaf03df62017-07-18 16:56:43 -0700345}
346
347/* represents WindowSurfaceController */
348message WindowSurfaceControllerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800349 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
350
Yi Jinc7f93072017-09-29 15:29:38 -0700351 optional bool shown = 1;
352 optional int32 layer = 2;
Steven Timotiusf2d68892017-08-28 17:00:01 -0700353}
354
355/* represents ScreenRotationAnimation */
356message ScreenRotationAnimationProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800357 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
358
Yi Jinc7f93072017-09-29 15:29:38 -0700359 optional bool started = 1;
360 optional bool animation_running = 2;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700361}
362
363/* represents WindowContainer */
364message WindowContainerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800365 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
366
Yi Jinc7f93072017-09-29 15:29:38 -0700367 optional ConfigurationContainerProto configuration_container = 1;
368 optional int32 orientation = 2;
Wale Ogunwaledf262f52017-12-07 18:17:12 -0800369 optional bool visible = 3;
Vishnu Nair04ab4392018-01-10 11:00:06 -0800370 optional SurfaceAnimatorProto surface_animator = 4;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700371}
372
373/* represents ConfigurationContainer */
374message ConfigurationContainerProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -0800375 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
376
Yi Jinc7f93072017-09-29 15:29:38 -0700377 optional .android.content.ConfigurationProto override_configuration = 1;
378 optional .android.content.ConfigurationProto full_configuration = 2;
379 optional .android.content.ConfigurationProto merged_override_configuration = 3;
Wale Ogunwale0d5609b2017-09-13 05:55:07 -0700380}