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/windowcontainerthumbnail.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 optional int32 focused_display_id = 9; 49} 50 51/* represents RootWindowContainer object */ 52message RootWindowContainerProto { 53 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 54 55 optional WindowContainerProto window_container = 1; 56 repeated DisplayContentProto displays = 2 [deprecated=true]; 57 reserved 3; // IdentifierProto windows 58 /* window references in top down z order */ 59 repeated WindowStateProto windows = 4 [deprecated=true]; 60 optional KeyguardControllerProto keyguard_controller = 5; 61 // Whether or not the home activity is the recents activity. This is needed for the CTS tests to 62 // know what activity types to check for when invoking splitscreen multi-window. 63 optional bool is_home_recents_component = 6; 64 repeated IdentifierProto pending_activities = 7; 65} 66 67message BarControllerProto { 68 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 69 70 optional .android.app.StatusBarManagerProto.WindowState state = 1; 71 optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2; 72} 73 74message WindowOrientationListenerProto { 75 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 76 77 optional bool enabled = 1; 78 optional .android.view.SurfaceProto.Rotation rotation = 2; 79} 80 81message KeyguardServiceDelegateProto { 82 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 83 84 optional bool showing = 1; 85 optional bool occluded = 2; 86 optional bool secure = 3; 87 enum ScreenState { 88 SCREEN_STATE_OFF = 0; 89 SCREEN_STATE_TURNING_ON = 1; 90 SCREEN_STATE_ON = 2; 91 SCREEN_STATE_TURNING_OFF = 3; 92 } 93 optional ScreenState screen_state = 4; 94 enum InteractiveState { 95 INTERACTIVE_STATE_SLEEP = 0; 96 INTERACTIVE_STATE_WAKING = 1; 97 INTERACTIVE_STATE_AWAKE = 2; 98 INTERACTIVE_STATE_GOING_TO_SLEEP = 3; 99 } 100 optional InteractiveState interactive_state = 5; 101} 102 103message KeyguardControllerProto { 104 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 105 106 optional bool keyguard_showing = 1; 107 repeated KeyguardOccludedProto keyguard_occluded_states = 2; 108 optional bool aod_showing = 3; 109} 110 111message KeyguardOccludedProto { 112 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 113 114 optional int32 display_id = 1; 115 optional bool keyguard_occluded = 2; 116} 117 118/* represents PhoneWindowManager */ 119message WindowManagerPolicyProto { 120 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 121 122 optional int32 last_system_ui_flags = 1 [deprecated=true]; 123 enum UserRotationMode { 124 USER_ROTATION_FREE = 0; 125 USER_ROTATION_LOCKED = 1; 126 } 127 optional UserRotationMode rotation_mode = 2; 128 optional .android.view.SurfaceProto.Rotation rotation = 3; 129 optional .android.content.ActivityInfoProto.ScreenOrientation orientation = 4; 130 optional bool screen_on_fully = 5; 131 optional bool keyguard_draw_complete = 6; 132 optional bool window_manager_draw_complete = 7; 133 optional string focused_app_token = 8 [deprecated=true]; 134 optional IdentifierProto focused_window = 9 [deprecated=true]; 135 optional IdentifierProto top_fullscreen_opaque_window = 10 [deprecated=true]; 136 optional IdentifierProto top_fullscreen_opaque_or_dimming_window = 11 [deprecated=true]; 137 optional bool keyguard_occluded = 12; 138 optional bool keyguard_occluded_changed = 13; 139 optional bool keyguard_occluded_pending = 14; 140 optional bool force_status_bar = 15 [deprecated=true]; 141 optional bool force_status_bar_from_keyguard = 16 [deprecated=true]; 142 optional BarControllerProto status_bar = 17 [deprecated=true]; 143 optional BarControllerProto navigation_bar = 18 [deprecated=true]; 144 optional WindowOrientationListenerProto orientation_listener = 19 [deprecated=true]; 145 optional KeyguardServiceDelegateProto keyguard_delegate = 20; 146} 147 148/* represents AppTransition */ 149message AppTransitionProto { 150 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 151 152 enum AppState { 153 APP_STATE_IDLE = 0; 154 APP_STATE_READY = 1; 155 APP_STATE_RUNNING = 2; 156 APP_STATE_TIMEOUT = 3; 157 } 158 optional AppState app_transition_state = 1; 159 160 optional .android.view.TransitionTypeEnum last_used_app_transition = 2; 161} 162 163/* represents DisplayContent object */ 164message DisplayContentProto { 165 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 166 167 optional WindowContainerProto window_container = 1; 168 optional int32 id = 2; 169 reserved 3; // stacks 170 optional DockedStackDividerControllerProto docked_stack_divider_controller = 4 [deprecated=true]; 171 // Will be removed soon. 172 optional PinnedStackControllerProto pinned_stack_controller = 5 [deprecated=true]; 173 /* non app windows */ 174 repeated WindowTokenProto above_app_windows = 6 [deprecated=true]; 175 repeated WindowTokenProto below_app_windows = 7 [deprecated=true]; 176 repeated WindowTokenProto ime_windows = 8 [deprecated=true]; 177 optional int32 dpi = 9; 178 optional .android.view.DisplayInfoProto display_info = 10; 179 optional int32 rotation = 11; 180 optional ScreenRotationAnimationProto screen_rotation_animation = 12; 181 optional DisplayFramesProto display_frames = 13; 182 optional int32 surface_size = 14 [deprecated=true]; 183 optional string focused_app = 15; 184 optional AppTransitionProto app_transition = 16; 185 repeated IdentifierProto opening_apps = 17; 186 repeated IdentifierProto closing_apps = 18; 187 repeated IdentifierProto changing_apps = 19; 188 repeated WindowTokenProto overlay_windows = 20; 189 optional DisplayAreaProto root_display_area = 21; 190 191 192 optional bool single_task_instance = 22; 193 optional int32 focused_root_task_id = 23; 194 optional .com.android.server.wm.IdentifierProto resumed_activity = 24; 195 repeated TaskProto tasks = 25 [deprecated=true]; 196 optional bool display_ready = 26; 197} 198 199/* represents DisplayArea object */ 200message DisplayAreaProto { 201 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 202 203 optional WindowContainerProto window_container = 1; 204 optional string name = 2 [ (.android.privacy).dest = DEST_EXPLICIT ]; 205 repeated DisplayAreaChildProto children = 3 [deprecated=true]; 206} 207 208/* represents a generic child of a DisplayArea */ 209message DisplayAreaChildProto { 210 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 211 212 /* At most one of the following should be present: */ 213 214 /* represents a DisplayArea child */ 215 optional DisplayAreaProto display_area = 1; 216 /* represents a WindowToken child */ 217 optional WindowTokenProto window = 2; 218 /* represents an unknown child - the class name is recorded */ 219 repeated string unknown = 3; 220} 221 222/* represents DisplayFrames */ 223message DisplayFramesProto { 224 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 225 226 optional .android.graphics.RectProto stable_bounds = 1; 227} 228 229/* represents DockedStackDividerController */ 230message DockedStackDividerControllerProto { 231 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 232 233 optional bool minimized_dock = 1 [deprecated=true]; 234} 235 236/* represents PinnedStackController */ 237message PinnedStackControllerProto { 238 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 239 240 optional .android.graphics.RectProto default_bounds = 1 [deprecated=true]; 241 optional .android.graphics.RectProto movement_bounds = 2 [deprecated=true]; 242} 243 244/* represents Task */ 245message TaskProto { 246 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 247 248 optional WindowContainerProto window_container = 1; 249 optional int32 id = 2; 250 reserved 3; // activity 251 optional bool fills_parent = 4; 252 optional .android.graphics.RectProto bounds = 5; 253 optional .android.graphics.RectProto displayed_bounds = 6 [deprecated=true]; 254 optional bool defer_removal = 7; 255 optional int32 surface_width = 8; 256 optional int32 surface_height = 9; 257 258 repeated TaskProto tasks = 10 [deprecated=true]; 259 repeated ActivityRecordProto activities = 11 [deprecated=true]; 260 261 optional .com.android.server.wm.IdentifierProto resumed_activity = 12; 262 optional string real_activity = 13; 263 optional string orig_activity = 14; 264 265 optional int32 display_id = 15; 266 optional int32 root_task_id = 16; 267 optional int32 activity_type = 17; 268 optional int32 resize_mode = 18; 269 optional int32 min_width = 19; 270 optional int32 min_height = 20; 271 272 optional .android.graphics.RectProto adjusted_bounds = 21; 273 optional .android.graphics.RectProto last_non_fullscreen_bounds = 22; 274 optional bool adjusted_for_ime = 23; 275 optional float adjust_ime_amount = 24; 276 optional float adjust_divider_amount = 25; 277 optional bool animating_bounds = 26; 278 optional float minimize_amount = 27; 279 optional bool created_by_organizer = 28; 280} 281 282/* represents ActivityRecordProto */ 283message ActivityRecordProto { 284 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 285 286 optional string name = 1 [ (.android.privacy).dest = DEST_EXPLICIT ]; 287 288 optional WindowTokenProto window_token = 2; 289 optional bool last_surface_showing = 3; 290 optional bool is_waiting_for_transition_start = 4; 291 optional bool is_animating = 5; 292 optional WindowContainerThumbnailProto thumbnail = 6; 293 optional bool fills_parent = 7; 294 optional bool app_stopped = 8; 295 optional bool visible_requested = 9; 296 optional bool client_visible = 10; 297 optional bool defer_hiding_client = 11; 298 optional bool reported_drawn = 12; 299 optional bool reported_visible = 13; 300 optional int32 num_interesting_windows = 14; 301 optional int32 num_drawn_windows = 15; 302 optional bool all_drawn = 16; 303 optional bool last_all_drawn = 17; 304 reserved 18; // removed 305 optional IdentifierProto starting_window = 19; 306 optional bool starting_displayed = 20; 307 optional bool starting_moved = 201; 308 optional bool visible_set_from_transferred_starting_window = 22; 309 repeated .android.graphics.RectProto frozen_bounds = 23; 310 optional bool visible = 24; 311 reserved 25; // configuration_container 312 optional IdentifierProto identifier = 26; 313 optional string state = 27 [(.android.privacy).dest = DEST_EXPLICIT]; 314 optional bool front_of_task = 28; 315 optional int32 proc_id = 29; 316 optional bool translucent = 30; 317} 318 319/* represents WindowToken */ 320message WindowTokenProto { 321 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 322 323 optional WindowContainerProto window_container = 1; 324 optional int32 hash_code = 2; 325 repeated WindowStateProto windows = 3 [deprecated=true]; 326 optional bool waiting_to_show = 5; 327 optional bool paused = 6; 328} 329 330/* represents WindowState */ 331message WindowStateProto { 332 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 333 334 optional WindowContainerProto window_container = 1; 335 optional IdentifierProto identifier = 2; 336 // Unique identifier of a DisplayContent stack. 337 optional int32 display_id = 3; 338 // Unique identifier for the task stack. 339 optional int32 stack_id = 4; 340 optional .android.view.WindowLayoutParamsProto attributes = 5; 341 optional .android.graphics.RectProto given_content_insets = 6; 342 optional .android.graphics.RectProto frame = 7 [deprecated=true]; 343 optional .android.graphics.RectProto containing_frame = 8 [deprecated=true]; 344 optional .android.graphics.RectProto parent_frame = 9 [deprecated=true]; 345 optional .android.graphics.RectProto content_frame = 10 [deprecated=true]; 346 optional .android.graphics.RectProto content_insets = 11 [deprecated=true]; 347 optional .android.graphics.RectProto surface_insets = 12; 348 optional WindowStateAnimatorProto animator = 13; 349 optional bool animating_exit = 14; 350 repeated WindowStateProto child_windows = 15 [deprecated=true]; 351 optional .android.graphics.RectProto surface_position = 16; 352 optional int32 requested_width = 18; 353 optional int32 requested_height = 19; 354 optional int32 view_visibility = 20; 355 optional int32 system_ui_visibility = 21; 356 optional bool has_surface = 22; 357 optional bool is_ready_for_display = 23; 358 optional .android.graphics.RectProto display_frame = 24 [deprecated=true]; 359 optional .android.graphics.RectProto overscan_frame = 25 [deprecated=true]; 360 optional .android.graphics.RectProto visible_frame = 26 [deprecated=true]; 361 optional .android.graphics.RectProto decor_frame = 27 [deprecated=true]; 362 optional .android.graphics.RectProto outset_frame = 28 [deprecated=true]; 363 optional .android.graphics.RectProto overscan_insets = 29 [deprecated=true]; 364 optional .android.graphics.RectProto visible_insets = 30 [deprecated=true]; 365 optional .android.graphics.RectProto stable_insets = 31 [deprecated=true]; 366 optional .android.graphics.RectProto outsets = 32 [deprecated=true]; 367 optional .android.view.DisplayCutoutProto cutout = 33 [deprecated=true]; 368 optional bool remove_on_exit = 34; 369 optional bool destroying = 35; 370 optional bool removed = 36; 371 optional bool is_on_screen = 37; 372 optional bool is_visible = 38; 373 optional bool pending_seamless_rotation = 39; 374 optional int64 finished_seamless_rotation_frame = 40; 375 optional WindowFramesProto window_frames = 41; 376 optional bool force_seamless_rotation = 42; 377} 378 379message IdentifierProto { 380 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 381 382 optional int32 hash_code = 1; 383 optional int32 user_id = 2; 384 // Either a component name/string (eg: "com.android.settings/.FallbackHome") 385 // or a window title ("NavigationBar"). 386 optional string title = 3 [ (.android.privacy).dest = DEST_EXPLICIT ]; 387} 388 389/* represents WindowStateAnimator */ 390message WindowStateAnimatorProto { 391 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 392 393 optional .android.graphics.RectProto last_clip_rect = 1; 394 optional WindowSurfaceControllerProto surface = 2; 395 enum DrawState { 396 NO_SURFACE = 0; 397 DRAW_PENDING = 1; 398 COMMIT_DRAW_PENDING = 2; 399 READY_TO_SHOW = 3; 400 HAS_DRAWN = 4; 401 } 402 optional DrawState draw_state = 3; 403 optional .android.graphics.RectProto system_decor_rect = 4; 404} 405 406/* represents WindowSurfaceController */ 407message WindowSurfaceControllerProto { 408 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 409 410 optional bool shown = 1; 411 optional int32 layer = 2; 412} 413 414/* represents ScreenRotationAnimation */ 415message ScreenRotationAnimationProto { 416 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 417 418 optional bool started = 1; 419 optional bool animation_running = 2; 420} 421 422/* represents WindowContainer */ 423message WindowContainerProto { 424 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 425 426 optional ConfigurationContainerProto configuration_container = 1; 427 optional int32 orientation = 2; 428 optional bool visible = 3; 429 optional SurfaceAnimatorProto surface_animator = 4; 430 repeated WindowContainerChildProto children = 5; 431} 432 433/* represents a generic child of a WindowContainer */ 434message WindowContainerChildProto { 435 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 436 437 /* A window container can have multiple children of different types stored as 438 * a WindowContainerChildProto but each instance of WindowContainerChildProto 439 * can only contain a single type. 440 */ 441 /* We do not know the derived typ and the class is dumped 442 * as a WindowContainer */ 443 optional WindowContainerProto window_container = 2; 444 /* represents a DisplayContent child */ 445 optional DisplayContentProto display_content = 3; 446 /* represents a DisplayArea child */ 447 optional DisplayAreaProto display_area = 4; 448 /* represents a Task child */ 449 optional TaskProto task = 5; 450 /* represents an ActivityRecord child */ 451 optional ActivityRecordProto activity = 6; 452 /* represents a WindowToken child */ 453 optional WindowTokenProto window_token = 7; 454 /* represents a WindowState child */ 455 optional WindowStateProto window = 8; 456} 457 458/* represents ConfigurationContainer */ 459message ConfigurationContainerProto { 460 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 461 462 optional .android.content.ConfigurationProto override_configuration = 1; 463 optional .android.content.ConfigurationProto full_configuration = 2; 464 optional .android.content.ConfigurationProto merged_override_configuration = 3; 465} 466 467/* represents WindowFrames */ 468message WindowFramesProto { 469 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 470 471 optional .android.graphics.RectProto containing_frame = 1; 472 optional .android.graphics.RectProto content_frame = 2; 473 optional .android.graphics.RectProto decor_frame = 3; 474 optional .android.graphics.RectProto display_frame = 4; 475 optional .android.graphics.RectProto frame = 5; 476 optional .android.graphics.RectProto outset_frame = 6; 477 optional .android.graphics.RectProto overscan_frame = 7 [deprecated=true]; 478 optional .android.graphics.RectProto parent_frame = 8; 479 optional .android.graphics.RectProto visible_frame = 9; 480 optional .android.view.DisplayCutoutProto cutout = 10; 481 optional .android.graphics.RectProto content_insets = 11; 482 optional .android.graphics.RectProto overscan_insets = 12 [deprecated=true]; 483 optional .android.graphics.RectProto visible_insets = 13; 484 optional .android.graphics.RectProto stable_insets = 14; 485 optional .android.graphics.RectProto outsets = 15; 486} 487