• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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
17syntax = "proto2";
18
19import "frameworks/base/core/proto/android/app/statusbarmanager.proto";
20import "frameworks/base/core/proto/android/content/activityinfo.proto";
21import "frameworks/base/core/proto/android/content/configuration.proto";
22import "frameworks/base/core/proto/android/graphics/rect.proto";
23import "frameworks/base/core/proto/android/server/appwindowthumbnail.proto";
24import "frameworks/base/core/proto/android/server/surfaceanimator.proto";
25import "frameworks/base/core/proto/android/view/displaycutout.proto";
26import "frameworks/base/core/proto/android/view/displayinfo.proto";
27import "frameworks/base/core/proto/android/view/enums.proto";
28import "frameworks/base/core/proto/android/view/surface.proto";
29import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
30import "frameworks/base/core/proto/android/privacy.proto";
31
32package com.android.server.wm;
33
34option java_multiple_files = true;
35
36message WindowManagerServiceDumpProto {
37    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
38
39    optional WindowManagerPolicyProto policy = 1;
40    /* window hierarchy root */
41    optional RootWindowContainerProto root_window_container = 2;
42    optional IdentifierProto focused_window = 3;
43    optional string focused_app = 4;
44    optional IdentifierProto input_method_window = 5;
45    optional bool display_frozen = 6;
46    optional int32 rotation = 7;
47    optional int32 last_orientation = 8;
48}
49
50/* represents RootWindowContainer object */
51message RootWindowContainerProto {
52    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
53
54    optional WindowContainerProto window_container = 1;
55    repeated DisplayContentProto displays = 2;
56    /* window references in top down z order */
57    repeated IdentifierProto windows = 3;
58}
59
60message BarControllerProto {
61    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
62
63    optional .android.app.StatusBarManagerProto.WindowState state = 1;
64    optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2;
65}
66
67message WindowOrientationListenerProto {
68    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
69
70    optional bool enabled = 1;
71    optional .android.view.SurfaceProto.Rotation rotation = 2;
72}
73
74message KeyguardServiceDelegateProto {
75    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
76
77    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
96/* represents PhoneWindowManager */
97message WindowManagerPolicyProto {
98    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
99
100    optional int32 last_system_ui_flags = 1 [deprecated=true];
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 [deprecated=true];
112    optional IdentifierProto focused_window = 9 [deprecated=true];
113    optional IdentifierProto top_fullscreen_opaque_window = 10 [deprecated=true];
114    optional IdentifierProto top_fullscreen_opaque_or_dimming_window = 11 [deprecated=true];
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 [deprecated=true];
119    optional bool force_status_bar_from_keyguard = 16 [deprecated=true];
120    optional BarControllerProto status_bar = 17 [deprecated=true];
121    optional BarControllerProto navigation_bar = 18 [deprecated=true];
122    optional WindowOrientationListenerProto orientation_listener = 19 [deprecated=true];
123    optional KeyguardServiceDelegateProto keyguard_delegate = 20;
124}
125
126/* represents AppTransition */
127message AppTransitionProto {
128    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
129
130    enum AppState {
131        APP_STATE_IDLE = 0;
132        APP_STATE_READY = 1;
133        APP_STATE_RUNNING = 2;
134        APP_STATE_TIMEOUT = 3;
135    }
136    optional AppState app_transition_state = 1;
137
138    optional .android.view.TransitionTypeEnum last_used_app_transition = 2;
139}
140
141/* represents DisplayContent object */
142message DisplayContentProto {
143    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
144
145    optional WindowContainerProto window_container = 1;
146    optional int32 id = 2;
147    repeated StackProto stacks = 3;
148    optional DockedStackDividerControllerProto docked_stack_divider_controller = 4;
149    optional PinnedStackControllerProto pinned_stack_controller = 5;
150    /* non app windows */
151    repeated WindowTokenProto above_app_windows = 6;
152    repeated WindowTokenProto below_app_windows = 7;
153    repeated WindowTokenProto ime_windows = 8;
154    optional int32 dpi = 9;
155    optional .android.view.DisplayInfoProto display_info = 10;
156    optional int32 rotation = 11;
157    optional ScreenRotationAnimationProto screen_rotation_animation = 12;
158    optional DisplayFramesProto display_frames = 13;
159    optional int32 surface_size = 14 [deprecated=true];
160    optional string focused_app = 15;
161    optional AppTransitionProto app_transition = 16;
162    repeated IdentifierProto opening_apps = 17;
163    repeated IdentifierProto closing_apps = 18;
164    repeated IdentifierProto changing_apps = 19;
165}
166
167/* represents DisplayFrames */
168message DisplayFramesProto {
169    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
170
171    optional .android.graphics.RectProto stable_bounds = 1;
172}
173
174/* represents DockedStackDividerController */
175message DockedStackDividerControllerProto {
176    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
177
178    optional bool minimized_dock = 1;
179}
180
181/* represents PinnedStackController */
182message PinnedStackControllerProto {
183    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
184
185    optional .android.graphics.RectProto default_bounds = 1;
186    optional .android.graphics.RectProto movement_bounds = 2;
187}
188
189/* represents TaskStack */
190message StackProto {
191    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
192
193    optional WindowContainerProto window_container = 1;
194    optional int32 id = 2;
195    repeated TaskProto tasks = 3;
196    optional bool fills_parent = 4;
197    optional .android.graphics.RectProto bounds = 5;
198    optional bool animation_background_surface_is_dimming = 6;
199    optional bool defer_removal = 7;
200    optional float minimize_amount = 8;
201    optional bool adjusted_for_ime = 9;
202    optional float adjust_ime_amount = 10;
203    optional float adjust_divider_amount = 11;
204    optional .android.graphics.RectProto adjusted_bounds = 12;
205    optional bool animating_bounds = 13;
206}
207
208/* represents Task */
209message TaskProto {
210    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
211
212    optional WindowContainerProto window_container = 1;
213    optional int32 id = 2;
214    repeated AppWindowTokenProto app_window_tokens = 3;
215    optional bool fills_parent = 4;
216    optional .android.graphics.RectProto bounds = 5;
217    optional .android.graphics.RectProto displayed_bounds = 6;
218    optional bool defer_removal = 7;
219    optional int32 surface_width = 8;
220    optional int32 surface_height = 9;
221}
222
223/* represents AppWindowToken */
224message AppWindowTokenProto {
225    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
226
227    /* obtained from ActivityRecord */
228    optional string name = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
229    optional WindowTokenProto window_token = 2;
230    optional bool last_surface_showing = 3;
231    optional bool is_waiting_for_transition_start = 4;
232    optional bool is_really_animating = 5;
233    optional AppWindowThumbnailProto thumbnail = 6;
234    optional bool fills_parent = 7;
235    optional bool app_stopped = 8;
236    optional bool hidden_requested = 9;
237    optional bool client_hidden = 10;
238    optional bool defer_hiding_client = 11;
239    optional bool reported_drawn = 12;
240    optional bool reported_visible = 13;
241    optional int32 num_interesting_windows = 14;
242    optional int32 num_drawn_windows = 15;
243    optional bool all_drawn = 16;
244    optional bool last_all_drawn = 17;
245    optional bool removed = 18;
246    optional IdentifierProto starting_window = 19;
247    optional bool starting_displayed = 20;
248    optional bool starting_moved = 21;
249    optional bool hidden_set_from_transferred_starting_window = 22;
250    repeated .android.graphics.RectProto frozen_bounds = 23;
251}
252
253/* represents WindowToken */
254message WindowTokenProto {
255    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
256
257    optional WindowContainerProto window_container = 1;
258    optional int32 hash_code = 2;
259    repeated WindowStateProto windows = 3;
260    optional bool hidden = 4;
261    optional bool waiting_to_show = 5;
262    optional bool paused = 6;
263}
264
265/* represents WindowState */
266message WindowStateProto {
267    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
268
269    optional WindowContainerProto window_container = 1;
270    optional IdentifierProto identifier = 2;
271    // Unique identifier of a DisplayContent stack.
272    optional int32 display_id = 3;
273    // Unique identifier for the task stack.
274    optional int32 stack_id = 4;
275    optional .android.view.WindowLayoutParamsProto attributes = 5;
276    optional .android.graphics.RectProto given_content_insets = 6;
277    optional .android.graphics.RectProto frame = 7 [deprecated=true];
278    optional .android.graphics.RectProto containing_frame = 8 [deprecated=true];
279    optional .android.graphics.RectProto parent_frame = 9 [deprecated=true];
280    optional .android.graphics.RectProto content_frame = 10 [deprecated=true];
281    optional .android.graphics.RectProto content_insets = 11 [deprecated=true];
282    optional .android.graphics.RectProto surface_insets = 12;
283    optional WindowStateAnimatorProto animator = 13;
284    optional bool animating_exit = 14;
285    repeated WindowStateProto child_windows = 15;
286    optional .android.graphics.RectProto surface_position = 16;
287    optional int32 requested_width = 18;
288    optional int32 requested_height = 19;
289    optional int32 view_visibility = 20;
290    optional int32 system_ui_visibility = 21;
291    optional bool has_surface = 22;
292    optional bool is_ready_for_display = 23;
293    optional .android.graphics.RectProto display_frame = 24 [deprecated=true];
294    optional .android.graphics.RectProto overscan_frame = 25 [deprecated=true];
295    optional .android.graphics.RectProto visible_frame = 26 [deprecated=true];
296    optional .android.graphics.RectProto decor_frame = 27 [deprecated=true];
297    optional .android.graphics.RectProto outset_frame = 28 [deprecated=true];
298    optional .android.graphics.RectProto overscan_insets = 29 [deprecated=true];
299    optional .android.graphics.RectProto visible_insets = 30 [deprecated=true];
300    optional .android.graphics.RectProto stable_insets = 31 [deprecated=true];
301    optional .android.graphics.RectProto outsets = 32 [deprecated=true];
302    optional .android.view.DisplayCutoutProto cutout = 33 [deprecated=true];
303    optional bool remove_on_exit = 34;
304    optional bool destroying = 35;
305    optional bool removed = 36;
306    optional bool is_on_screen = 37;
307    optional bool is_visible = 38;
308    optional bool pending_seamless_rotation = 39;
309    optional int64 finished_seamless_rotation_frame = 40;
310    optional WindowFramesProto window_frames = 41;
311    optional bool force_seamless_rotation = 42;
312}
313
314message IdentifierProto {
315    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
316
317    optional int32 hash_code = 1;
318    optional int32 user_id = 2;
319    // Either a component name/string (eg: "com.android.settings/.FallbackHome")
320    // or a window title ("NavigationBar").
321    optional string title = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
322}
323
324/* represents WindowStateAnimator */
325message WindowStateAnimatorProto {
326    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
327
328    optional .android.graphics.RectProto last_clip_rect = 1;
329    optional WindowSurfaceControllerProto surface = 2;
330    enum DrawState {
331        NO_SURFACE = 0;
332        DRAW_PENDING = 1;
333        COMMIT_DRAW_PENDING = 2;
334        READY_TO_SHOW = 3;
335        HAS_DRAWN = 4;
336    }
337    optional DrawState draw_state = 3;
338    optional .android.graphics.RectProto system_decor_rect = 4;
339}
340
341/* represents WindowSurfaceController */
342message WindowSurfaceControllerProto {
343    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
344
345    optional bool shown = 1;
346    optional int32 layer = 2;
347}
348
349/* represents ScreenRotationAnimation */
350message ScreenRotationAnimationProto {
351    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
352
353    optional bool started = 1;
354    optional bool animation_running = 2;
355}
356
357/* represents WindowContainer */
358message WindowContainerProto {
359    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
360
361    optional ConfigurationContainerProto configuration_container = 1;
362    optional int32 orientation = 2;
363    optional bool visible = 3;
364    optional SurfaceAnimatorProto surface_animator = 4;
365}
366
367/* represents ConfigurationContainer */
368message ConfigurationContainerProto {
369    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
370
371    optional .android.content.ConfigurationProto override_configuration = 1;
372    optional .android.content.ConfigurationProto full_configuration = 2;
373    optional .android.content.ConfigurationProto merged_override_configuration = 3;
374}
375
376/* represents WindowFrames */
377message WindowFramesProto {
378    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
379
380    optional .android.graphics.RectProto containing_frame = 1;
381    optional .android.graphics.RectProto content_frame = 2;
382    optional .android.graphics.RectProto decor_frame = 3;
383    optional .android.graphics.RectProto display_frame = 4;
384    optional .android.graphics.RectProto frame = 5;
385    optional .android.graphics.RectProto outset_frame = 6;
386    optional .android.graphics.RectProto overscan_frame = 7;
387    optional .android.graphics.RectProto parent_frame = 8;
388    optional .android.graphics.RectProto visible_frame = 9;
389    optional .android.view.DisplayCutoutProto cutout = 10;
390    optional .android.graphics.RectProto content_insets = 11;
391    optional .android.graphics.RectProto overscan_insets = 12;
392    optional .android.graphics.RectProto visible_insets = 13;
393    optional .android.graphics.RectProto stable_insets = 14;
394    optional .android.graphics.RectProto outsets = 15;
395}
396