Loading core/proto/android/app/statusbarmanager.proto 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.app; option java_multiple_files = true; message StatusBarManagerProto { enum WindowState { WINDOW_STATE_SHOWING = 0; WINDOW_STATE_HIDING = 1; WINDOW_STATE_HIDDEN = 2; } enum TransientWindowState { TRANSIENT_BAR_NONE = 0; TRANSIENT_BAR_SHOW_REQUESTED = 1; TRANSIENT_BAR_SHOWING = 2; TRANSIENT_BAR_HIDING = 3; } } core/proto/android/content/activityinfo.proto 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.content; option java_multiple_files = true; message ActivityInfoProto { enum ScreenOrientation { SCREEN_ORIENTATION_UNSET = -2; SCREEN_ORIENTATION_UNSPECIFIED = -1; SCREEN_ORIENTATION_LANDSCAPE = 0; SCREEN_ORIENTATION_PORTRAIT = 1; SCREEN_ORIENTATION_USER = 2; SCREEN_ORIENTATION_BEHIND = 3; SCREEN_ORIENTATION_SENSOR = 4; SCREEN_ORIENTATION_NOSENSOR = 5; SCREEN_ORIENTATION_SENSOR_LANDSCAPE = 6; SCREEN_ORIENTATION_SENSOR_PORTRAIT = 7; SCREEN_ORIENTATION_REVERSE_LANDSCAPE = 8; SCREEN_ORIENTATION_REVERSE_PORTRAIT = 9; SCREEN_ORIENTATION_FULL_SENSOR = 10; SCREEN_ORIENTATION_USER_LANDSCAPE = 11; SCREEN_ORIENTATION_USER_PORTRAIT = 12; SCREEN_ORIENTATION_FULL_USER = 13; SCREEN_ORIENTATION_LOCKED = 14; } } core/proto/android/server/windowmanagerservice.proto +57 −0 Original line number Diff line number Diff line Loading @@ -16,12 +16,15 @@ syntax = "proto2"; import "frameworks/base/core/proto/android/app/statusbarmanager.proto"; import "frameworks/base/core/proto/android/content/activityinfo.proto"; import "frameworks/base/core/proto/android/content/configuration.proto"; import "frameworks/base/core/proto/android/graphics/rect.proto"; import "frameworks/base/core/proto/android/server/appwindowthumbnail.proto"; import "frameworks/base/core/proto/android/server/surfaceanimator.proto"; import "frameworks/base/core/proto/android/view/displaycutout.proto"; import "frameworks/base/core/proto/android/view/displayinfo.proto"; import "frameworks/base/core/proto/android/view/surface.proto"; import "frameworks/base/core/proto/android/view/windowlayoutparams.proto"; package com.android.server.wm.proto; Loading Loading @@ -49,8 +52,62 @@ message RootWindowContainerProto { repeated IdentifierProto windows = 3; } message BarControllerProto { optional .android.app.StatusBarManagerProto.WindowState state = 1; optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2; } message WindowOrientationListenerProto { optional bool enabled = 1; optional .android.view.SurfaceProto.Rotation rotation = 2; } message KeyguardServiceDelegateProto { optional bool showing = 1; optional bool occluded = 2; optional bool secure = 3; enum ScreenState { SCREEN_STATE_OFF = 0; SCREEN_STATE_TURNING_ON = 1; SCREEN_STATE_ON = 2; SCREEN_STATE_TURNING_OFF = 3; } optional ScreenState screen_state = 4; enum InteractiveState { INTERACTIVE_STATE_SLEEP = 0; INTERACTIVE_STATE_WAKING = 1; INTERACTIVE_STATE_AWAKE = 2; INTERACTIVE_STATE_GOING_TO_SLEEP = 3; } optional InteractiveState interactive_state = 5; } /* represents PhoneWindowManager */ message WindowManagerPolicyProto { optional int32 last_system_ui_flags = 1; enum UserRotationMode { USER_ROTATION_FREE = 0; USER_ROTATION_LOCKED = 1; } optional UserRotationMode rotation_mode = 2; optional .android.view.SurfaceProto.Rotation rotation = 3; optional .android.content.ActivityInfoProto.ScreenOrientation orientation = 4; optional bool screen_on_fully = 5; optional bool keyguard_draw_complete = 6; optional bool window_manager_draw_complete = 7; optional string focused_app_token = 8; optional IdentifierProto focused_window = 9; optional IdentifierProto top_fullscreen_opaque_window = 10; optional IdentifierProto top_fullscreen_opaque_or_dimming_window = 11; optional bool keyguard_occluded = 12; optional bool keyguard_occluded_changed = 13; optional bool keyguard_occluded_pending = 14; optional bool force_status_bar = 15; optional bool force_status_bar_from_keyguard = 16; optional BarControllerProto status_bar = 17; optional BarControllerProto navigation_bar = 18; optional WindowOrientationListenerProto orientation_listener = 19; optional KeyguardServiceDelegateProto keyguard_delegate = 20; } /* represents AppTransition */ Loading core/proto/android/view/surface.proto 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.view; option java_multiple_files = true; message SurfaceProto { enum Rotation { ROTATION_0 = 0; ROTATION_90 = 1; ROTATION_180 = 2; ROTATION_270 = 3; } } services/core/java/com/android/server/policy/BarController.java +11 −1 Original line number Diff line number Diff line Loading @@ -16,13 +16,16 @@ package com.android.server.policy; import static com.android.server.wm.proto.BarControllerProto.STATE; import static com.android.server.wm.proto.BarControllerProto.TRANSIENT_STATE; import android.app.StatusBarManager; import android.os.Handler; import android.os.Message; import android.os.SystemClock; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import com.android.server.LocalServices; Loading Loading @@ -311,6 +314,13 @@ public class BarController { throw new IllegalArgumentException("Unknown state " + state); } public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(STATE, mState); proto.write(TRANSIENT_STATE, mTransientBarState); proto.end(token); } public void dump(PrintWriter pw, String prefix) { if (mWin != null) { pw.print(prefix); pw.println(mTag); Loading Loading
core/proto/android/app/statusbarmanager.proto 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.app; option java_multiple_files = true; message StatusBarManagerProto { enum WindowState { WINDOW_STATE_SHOWING = 0; WINDOW_STATE_HIDING = 1; WINDOW_STATE_HIDDEN = 2; } enum TransientWindowState { TRANSIENT_BAR_NONE = 0; TRANSIENT_BAR_SHOW_REQUESTED = 1; TRANSIENT_BAR_SHOWING = 2; TRANSIENT_BAR_HIDING = 3; } }
core/proto/android/content/activityinfo.proto 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.content; option java_multiple_files = true; message ActivityInfoProto { enum ScreenOrientation { SCREEN_ORIENTATION_UNSET = -2; SCREEN_ORIENTATION_UNSPECIFIED = -1; SCREEN_ORIENTATION_LANDSCAPE = 0; SCREEN_ORIENTATION_PORTRAIT = 1; SCREEN_ORIENTATION_USER = 2; SCREEN_ORIENTATION_BEHIND = 3; SCREEN_ORIENTATION_SENSOR = 4; SCREEN_ORIENTATION_NOSENSOR = 5; SCREEN_ORIENTATION_SENSOR_LANDSCAPE = 6; SCREEN_ORIENTATION_SENSOR_PORTRAIT = 7; SCREEN_ORIENTATION_REVERSE_LANDSCAPE = 8; SCREEN_ORIENTATION_REVERSE_PORTRAIT = 9; SCREEN_ORIENTATION_FULL_SENSOR = 10; SCREEN_ORIENTATION_USER_LANDSCAPE = 11; SCREEN_ORIENTATION_USER_PORTRAIT = 12; SCREEN_ORIENTATION_FULL_USER = 13; SCREEN_ORIENTATION_LOCKED = 14; } }
core/proto/android/server/windowmanagerservice.proto +57 −0 Original line number Diff line number Diff line Loading @@ -16,12 +16,15 @@ syntax = "proto2"; import "frameworks/base/core/proto/android/app/statusbarmanager.proto"; import "frameworks/base/core/proto/android/content/activityinfo.proto"; import "frameworks/base/core/proto/android/content/configuration.proto"; import "frameworks/base/core/proto/android/graphics/rect.proto"; import "frameworks/base/core/proto/android/server/appwindowthumbnail.proto"; import "frameworks/base/core/proto/android/server/surfaceanimator.proto"; import "frameworks/base/core/proto/android/view/displaycutout.proto"; import "frameworks/base/core/proto/android/view/displayinfo.proto"; import "frameworks/base/core/proto/android/view/surface.proto"; import "frameworks/base/core/proto/android/view/windowlayoutparams.proto"; package com.android.server.wm.proto; Loading Loading @@ -49,8 +52,62 @@ message RootWindowContainerProto { repeated IdentifierProto windows = 3; } message BarControllerProto { optional .android.app.StatusBarManagerProto.WindowState state = 1; optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2; } message WindowOrientationListenerProto { optional bool enabled = 1; optional .android.view.SurfaceProto.Rotation rotation = 2; } message KeyguardServiceDelegateProto { optional bool showing = 1; optional bool occluded = 2; optional bool secure = 3; enum ScreenState { SCREEN_STATE_OFF = 0; SCREEN_STATE_TURNING_ON = 1; SCREEN_STATE_ON = 2; SCREEN_STATE_TURNING_OFF = 3; } optional ScreenState screen_state = 4; enum InteractiveState { INTERACTIVE_STATE_SLEEP = 0; INTERACTIVE_STATE_WAKING = 1; INTERACTIVE_STATE_AWAKE = 2; INTERACTIVE_STATE_GOING_TO_SLEEP = 3; } optional InteractiveState interactive_state = 5; } /* represents PhoneWindowManager */ message WindowManagerPolicyProto { optional int32 last_system_ui_flags = 1; enum UserRotationMode { USER_ROTATION_FREE = 0; USER_ROTATION_LOCKED = 1; } optional UserRotationMode rotation_mode = 2; optional .android.view.SurfaceProto.Rotation rotation = 3; optional .android.content.ActivityInfoProto.ScreenOrientation orientation = 4; optional bool screen_on_fully = 5; optional bool keyguard_draw_complete = 6; optional bool window_manager_draw_complete = 7; optional string focused_app_token = 8; optional IdentifierProto focused_window = 9; optional IdentifierProto top_fullscreen_opaque_window = 10; optional IdentifierProto top_fullscreen_opaque_or_dimming_window = 11; optional bool keyguard_occluded = 12; optional bool keyguard_occluded_changed = 13; optional bool keyguard_occluded_pending = 14; optional bool force_status_bar = 15; optional bool force_status_bar_from_keyguard = 16; optional BarControllerProto status_bar = 17; optional BarControllerProto navigation_bar = 18; optional WindowOrientationListenerProto orientation_listener = 19; optional KeyguardServiceDelegateProto keyguard_delegate = 20; } /* represents AppTransition */ Loading
core/proto/android/view/surface.proto 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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"; package android.view; option java_multiple_files = true; message SurfaceProto { enum Rotation { ROTATION_0 = 0; ROTATION_90 = 1; ROTATION_180 = 2; ROTATION_270 = 3; } }
services/core/java/com/android/server/policy/BarController.java +11 −1 Original line number Diff line number Diff line Loading @@ -16,13 +16,16 @@ package com.android.server.policy; import static com.android.server.wm.proto.BarControllerProto.STATE; import static com.android.server.wm.proto.BarControllerProto.TRANSIENT_STATE; import android.app.StatusBarManager; import android.os.Handler; import android.os.Message; import android.os.SystemClock; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import com.android.server.LocalServices; Loading Loading @@ -311,6 +314,13 @@ public class BarController { throw new IllegalArgumentException("Unknown state " + state); } public void writeToProto(ProtoOutputStream proto, long fieldId) { final long token = proto.start(fieldId); proto.write(STATE, mState); proto.write(TRANSIENT_STATE, mTransientBarState); proto.end(token); } public void dump(PrintWriter pw, String prefix) { if (mWin != null) { pw.print(prefix); pw.println(mTag); Loading