blob: 7fb48028494d30bcd946c090e278c665d851ead7 [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 = "proto3";
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 {
WindowManagerPolicyProto policy = 1;
/* window manager hierarchy structure */
repeated DisplayProto displays = 2;
/* window references in top down z order */
repeated IdentifierProto windows = 3;
IdentifierProto focused_window = 4;
string focused_app = 5;
IdentifierProto input_method_window = 6;
bool display_frozen = 7;
int32 rotation = 8;
int32 last_orientation = 9;
AppTransitionProto app_transition = 10;
}
/* represents PhoneWindowManager */
message WindowManagerPolicyProto {
.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;
}
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;
}
TransitionType last_used_app_transition = 2;
}
/* represents DisplayContent */
message DisplayProto {
int32 id = 1;
repeated StackProto stacks = 2;
DockedStackDividerControllerProto docked_stack_divider_controller = 3;
PinnedStackControllerProto pinned_stack_controller = 4;
/* non app windows */
repeated WindowTokenProto above_app_windows = 5;
repeated WindowTokenProto below_app_windows = 6;
repeated WindowTokenProto ime_windows = 7;
int32 dpi = 8;
.android.view.DisplayInfoProto display_info = 9;
}
/* represents DockedStackDividerController */
message DockedStackDividerControllerProto {
bool minimized_dock = 1;
}
/* represents PinnedStackController */
message PinnedStackControllerProto {
.android.graphics.RectProto default_bounds = 1;
.android.graphics.RectProto movement_bounds = 2;
}
/* represents TaskStack */
message StackProto {
int32 id = 1;
repeated TaskProto tasks = 2;
bool fills_parent = 3;
.android.graphics.RectProto bounds = 4;
bool animation_background_surface_is_dimming = 5;
}
/* represents Task */
message TaskProto {
int32 id = 1;
repeated AppWindowTokenProto app_window_tokens = 2;
bool fills_parent = 3;
.android.graphics.RectProto bounds = 4;
.android.graphics.RectProto temp_inset_bounds = 5;
}
/* represents AppWindowToken */
message AppWindowTokenProto {
/* obtained from ActivityRecord */
string name = 1;
WindowTokenProto window_token = 2;
}
/* represents WindowToken */
message WindowTokenProto {
int32 hash_code = 1;
repeated WindowStateProto windows = 2;
}
/* represents WindowState */
message WindowStateProto {
IdentifierProto identifier = 1;
int32 display_id = 2;
int32 stack_id = 3;
.android.view.WindowLayoutParamsProto attributes = 4;
.android.graphics.RectProto given_content_insets = 5;
.android.graphics.RectProto frame = 6;
.android.graphics.RectProto containing_frame = 7;
.android.graphics.RectProto parent_frame = 8;
.android.graphics.RectProto content_frame = 9;
.android.graphics.RectProto content_insets = 10;
.android.graphics.RectProto surface_insets = 11;
WindowStateAnimatorProto animator = 12;
bool animating_exit = 13;
repeated WindowStateProto child_windows = 14;
}
message IdentifierProto {
int32 hash_code = 1;
int32 user_id = 2;
string title = 3;
}
/* represents WindowStateAnimator */
message WindowStateAnimatorProto {
.android.graphics.RectProto last_clip_rect = 1;
WindowSurfaceControllerProto surface = 2;
}
/* represents WindowSurfaceController */
message WindowSurfaceControllerProto {
bool shown = 1;
int32 layer = 2;
}