blob: 064523a160584af76c73efca2b979b5328d86a8e [file] [log] [blame]
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
import "frameworks/base/core/proto/android/content/configuration.proto";
import "frameworks/base/core/proto/android/graphics/rect.proto";
import "frameworks/base/core/proto/android/view/displayinfo.proto";
import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
package com.android.server.wm.proto;
option java_multiple_files = true;
message WindowManagerServiceProto {
optional WindowManagerPolicyProto policy = 1;
/* window hierarchy root */
optional RootWindowContainerProto root_window_container = 2;
optional IdentifierProto focused_window = 3;
optional string focused_app = 4;
optional IdentifierProto input_method_window = 5;
optional bool display_frozen = 6;
optional int32 rotation = 7;
optional int32 last_orientation = 8;
optional AppTransitionProto app_transition = 9;
}
/* represents DisplayContent */
message RootWindowContainerProto {
optional WindowContainerProto window_container = 1;
repeated DisplayProto displays = 2;
/* window references in top down z order */
repeated IdentifierProto windows = 3;
}
/* represents PhoneWindowManager */
message WindowManagerPolicyProto {
optional .android.graphics.RectProto stable_bounds = 1;
}
/* represents AppTransition */
message AppTransitionProto {
enum AppState {
APP_STATE_IDLE = 0;
APP_STATE_READY = 1;
APP_STATE_RUNNING = 2;
APP_STATE_TIMEOUT = 3;
}
optional AppState app_transition_state = 1;
/* definitions for constants found in {@link com.android.server.wm.AppTransition} */
enum TransitionType {
TRANSIT_NONE = 0;
TRANSIT_UNSET = -1;
TRANSIT_ACTIVITY_OPEN = 6;
TRANSIT_ACTIVITY_CLOSE = 7;
TRANSIT_TASK_OPEN = 8;
TRANSIT_TASK_CLOSE = 9;
TRANSIT_TASK_TO_FRONT = 10;
TRANSIT_TASK_TO_BACK = 11;
TRANSIT_WALLPAPER_CLOSE = 12;
TRANSIT_WALLPAPER_OPEN = 13;
TRANSIT_WALLPAPER_INTRA_OPEN = 14;
TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
TRANSIT_TASK_OPEN_BEHIND = 16;
TRANSIT_TASK_IN_PLACE = 17;
TRANSIT_ACTIVITY_RELAUNCH = 18;
TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
TRANSIT_KEYGUARD_GOING_AWAY = 20;
TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
TRANSIT_KEYGUARD_OCCLUDE = 22;
TRANSIT_KEYGUARD_UNOCCLUDE = 23;
}
optional TransitionType last_used_app_transition = 2;
}
/* represents DisplayContent */
message DisplayProto {
optional WindowContainerProto window_container = 1;
optional int32 id = 2;
repeated StackProto stacks = 3;
optional DockedStackDividerControllerProto docked_stack_divider_controller = 4;
optional PinnedStackControllerProto pinned_stack_controller = 5;
/* non app windows */
repeated WindowTokenProto above_app_windows = 6;
repeated WindowTokenProto below_app_windows = 7;
repeated WindowTokenProto ime_windows = 8;
optional int32 dpi = 9;
optional .android.view.DisplayInfoProto display_info = 10;
optional int32 rotation = 11;
optional ScreenRotationAnimationProto screen_rotation_animation = 12;
}
/* represents DockedStackDividerController */
message DockedStackDividerControllerProto {
optional bool minimized_dock = 1;
}
/* represents PinnedStackController */
message PinnedStackControllerProto {
optional .android.graphics.RectProto default_bounds = 1;
optional .android.graphics.RectProto movement_bounds = 2;
}
/* represents TaskStack */
message StackProto {
optional WindowContainerProto window_container = 1;
optional int32 id = 2;
repeated TaskProto tasks = 3;
optional bool fills_parent = 4;
optional .android.graphics.RectProto bounds = 5;
optional bool animation_background_surface_is_dimming = 6;
}
/* represents Task */
message TaskProto {
optional WindowContainerProto window_container = 1;
optional int32 id = 2;
repeated AppWindowTokenProto app_window_tokens = 3;
optional bool fills_parent = 4;
optional .android.graphics.RectProto bounds = 5;
optional .android.graphics.RectProto temp_inset_bounds = 6;
}
/* represents AppWindowToken */
message AppWindowTokenProto {
/* obtained from ActivityRecord */
optional string name = 1;
optional WindowTokenProto window_token = 2;
}
/* represents WindowToken */
message WindowTokenProto {
optional WindowContainerProto window_container = 1;
optional int32 hash_code = 2;
repeated WindowStateProto windows = 3;
}
/* represents WindowState */
message WindowStateProto {
optional WindowContainerProto window_container = 1;
optional IdentifierProto identifier = 2;
optional int32 display_id = 3;
optional int32 stack_id = 4;
optional .android.view.WindowLayoutParamsProto attributes = 5;
optional .android.graphics.RectProto given_content_insets = 6;
optional .android.graphics.RectProto frame = 7;
optional .android.graphics.RectProto containing_frame = 8;
optional .android.graphics.RectProto parent_frame = 9;
optional .android.graphics.RectProto content_frame = 10;
optional .android.graphics.RectProto content_insets = 11;
optional .android.graphics.RectProto surface_insets = 12;
optional WindowStateAnimatorProto animator = 13;
optional bool animating_exit = 14;
repeated WindowStateProto child_windows = 15;
}
message IdentifierProto {
optional int32 hash_code = 1;
optional int32 user_id = 2;
optional string title = 3;
}
/* represents WindowStateAnimator */
message WindowStateAnimatorProto {
optional .android.graphics.RectProto last_clip_rect = 1;
optional WindowSurfaceControllerProto surface = 2;
}
/* represents WindowSurfaceController */
message WindowSurfaceControllerProto {
optional bool shown = 1;
optional int32 layer = 2;
}
/* represents ScreenRotationAnimation */
message ScreenRotationAnimationProto {
optional bool started = 1;
optional bool animation_running = 2;
}
/* represents WindowContainer */
message WindowContainerProto {
optional ConfigurationContainerProto configuration_container = 1;
optional int32 orientation = 2;
}
/* represents ConfigurationContainer */
message ConfigurationContainerProto {
optional .android.content.ConfigurationProto override_configuration = 1;
optional .android.content.ConfigurationProto full_configuration = 2;
optional .android.content.ConfigurationProto merged_override_configuration = 3;
}