diff --git a/core/proto/android/view/imefocuscontroller.proto b/core/proto/android/view/imefocuscontroller.proto new file mode 100644 index 0000000000000..ff9dee69207bb --- /dev/null +++ b/core/proto/android/view/imefocuscontroller.proto @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2020 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; + +/** + * Represents a {@link android.view.ImeFocusController} object. + */ +message ImeFocusControllerProto { + optional bool has_ime_focus = 1; + optional string served_view = 2; + optional string next_served_view = 3; +} \ No newline at end of file diff --git a/core/proto/android/view/imeinsetssourceconsumer.proto b/core/proto/android/view/imeinsetssourceconsumer.proto new file mode 100644 index 0000000000000..680916345a311 --- /dev/null +++ b/core/proto/android/view/imeinsetssourceconsumer.proto @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2020 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/view/inputmethod/editorinfo.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.ImeInsetsSourceConsumer} object. + */ +message ImeInsetsSourceConsumerProto { + optional .android.view.inputmethod.EditorInfoProto focused_editor = 1; + optional bool is_requested_visible_awaiting_control = 2; +} \ No newline at end of file diff --git a/core/proto/android/view/inputmethod/editorinfo.proto b/core/proto/android/view/inputmethod/editorinfo.proto new file mode 100644 index 0000000000000..f93096f9d395c --- /dev/null +++ b/core/proto/android/view/inputmethod/editorinfo.proto @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2020 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.inputmethod; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.inputmethod.EditorInfo} object. + */ +message EditorInfoProto { + optional int32 input_type = 1; + optional int32 ime_options = 2; + optional string private_ime_options = 3; + optional string package_name = 4; + optional int32 field_id = 5; + optional int32 target_input_method_user_id = 6; +} \ No newline at end of file diff --git a/core/proto/android/view/inputmethod/inputmethodeditortrace.proto b/core/proto/android/view/inputmethod/inputmethodeditortrace.proto new file mode 100644 index 0000000000000..732213966014e --- /dev/null +++ b/core/proto/android/view/inputmethod/inputmethodeditortrace.proto @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2020 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"; +option java_outer_classname = "InputMethodEditorTraceProto"; + +package android.view.inputmethod; + +import "frameworks/base/core/proto/android/view/inputmethod/inputmethodmanager.proto"; +import "frameworks/base/core/proto/android/view/viewrootimpl.proto"; +import "frameworks/base/core/proto/android/view/insetscontroller.proto"; +import "frameworks/base/core/proto/android/view/insetssourceconsumer.proto"; +import "frameworks/base/core/proto/android/view/imeinsetssourceconsumer.proto"; +import "frameworks/base/core/proto/android/view/inputmethod/editorinfo.proto"; +import "frameworks/base/core/proto/android/view/imefocuscontroller.proto"; + +/** + * Represents a file full of input method editor trace entries. + * Encoded, it should start with 0x9 0x49 0x4d 0x45 0x54 0x52 0x41 0x43 0x45 (.IMETRACE), such + * that they can be easily identified. + */ +message InputMethodEditorTraceFileProto { + + /* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L + (this is needed because enums have to be 32 bits and there's no nice way to put 64bit + constants into .proto files.) */ + enum MagicNumber { + INVALID = 0; + MAGIC_NUMBER_L = 0x54454d49; /* IMET (little-endian ASCII) */ + MAGIC_NUMBER_H = 0x45434152; /* RACE (little-endian ASCII) */ + } + + /* Must be the first field to allow winscope to auto-detect the dump type. Set to value + in MagicNumber */ + optional fixed64 magic_number = 1; + repeated InputMethodEditorProto entry = 2; +} + +/* one input method editor dump entry. */ +message InputMethodEditorProto { + + /* required: elapsed realtime in nanos since boot of when this entry was logged */ + optional fixed64 elapsed_realtime_nanos = 1; + optional ClientSideProto client_side_dump = 2; + + /* groups together the dump from ime related client side classes */ + message ClientSideProto { + optional InputMethodManagerProto input_method_manager = 1; + optional ViewRootImplProto view_root_impl = 2; + optional InsetsControllerProto insets_controller = 3; + optional InsetsSourceConsumerProto insets_source_consumer = 4; + optional ImeInsetsSourceConsumerProto ime_insets_source_consumer = 5; + optional EditorInfoProto editor_info = 6; + optional ImeFocusControllerProto ime_focus_controller = 7; + } +} \ No newline at end of file diff --git a/core/proto/android/view/inputmethod/inputmethodmanager.proto b/core/proto/android/view/inputmethod/inputmethodmanager.proto new file mode 100644 index 0000000000000..9fed0ef95a274 --- /dev/null +++ b/core/proto/android/view/inputmethod/inputmethodmanager.proto @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2020 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.inputmethod; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.inputmethod.InputMethodManager} object. + */ +message InputMethodManagerProto { + optional string cur_id = 1; + optional bool fullscreen_mode = 2; + optional int32 display_id = 3; + optional bool active = 4; + optional bool served_connecting = 5; +} \ No newline at end of file diff --git a/core/proto/android/view/insetsanimationcontrolimpl.proto b/core/proto/android/view/insetsanimationcontrolimpl.proto new file mode 100644 index 0000000000000..6eec37b8298e1 --- /dev/null +++ b/core/proto/android/view/insetsanimationcontrolimpl.proto @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020 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; + +/** + * Represents a {@link android.view.InsetsAnimationControlImpl} object. + */ +message InsetsAnimationControlImplProto { + optional bool is_cancelled = 1; + optional bool is_finished = 2; + optional string tmp_matrix = 3; + optional string pending_insets = 4; + optional float pending_fraction = 5; + optional bool shown_on_finish = 6; + optional float current_alpha = 7; + optional float pending_alpha = 8; +} \ No newline at end of file diff --git a/core/proto/android/view/insetscontroller.proto b/core/proto/android/view/insetscontroller.proto new file mode 100644 index 0000000000000..a8bf431ce156e --- /dev/null +++ b/core/proto/android/view/insetscontroller.proto @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2020 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/view/insetsstate.proto"; +import "frameworks/base/core/proto/android/view/insetsanimationcontrolimpl.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.InsetsController} object. + */ +message InsetsControllerProto { + optional InsetsStateProto state = 1; + repeated InsetsAnimationControlImplProto control = 2; +} \ No newline at end of file diff --git a/core/proto/android/view/insetssource.proto b/core/proto/android/view/insetssource.proto new file mode 100644 index 0000000000000..41b9f432a0ed4 --- /dev/null +++ b/core/proto/android/view/insetssource.proto @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2020 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/graphics/rect.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.InsetsSource} object. + */ +message InsetsSourceProto { + optional string type = 1; + optional .android.graphics.RectProto frame = 2; + optional .android.graphics.RectProto visible_frame = 3; + optional bool visible = 4; +} \ No newline at end of file diff --git a/core/proto/android/view/insetssourceconsumer.proto b/core/proto/android/view/insetssourceconsumer.proto new file mode 100644 index 0000000000000..487e06c1ccdf6 --- /dev/null +++ b/core/proto/android/view/insetssourceconsumer.proto @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2020 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/view/insetssourcecontrol.proto"; +import "frameworks/base/core/proto/android/graphics/rect.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.InsetsSourceConsumer} object. + */ +message InsetsSourceConsumerProto { + optional string internal_insets_type = 1; + optional bool has_window_focus = 2; + optional bool is_requested_visible = 3; + optional InsetsSourceControlProto source_control = 4; + optional .android.graphics.RectProto pending_frame = 5; + optional .android.graphics.RectProto pending_visible_frame = 6; +} \ No newline at end of file diff --git a/core/proto/android/view/insetssourcecontrol.proto b/core/proto/android/view/insetssourcecontrol.proto new file mode 100644 index 0000000000000..3ac3cbfafaffd --- /dev/null +++ b/core/proto/android/view/insetssourcecontrol.proto @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2020 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/graphics/point.proto"; +import "frameworks/base/core/proto/android/view/surfacecontrol.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.InsetsSourceControl} object. + */ +message InsetsSourceControlProto { + optional string type = 1; + optional .android.graphics.PointProto position = 2; + optional SurfaceControlProto leash = 3; +} \ No newline at end of file diff --git a/core/proto/android/view/insetsstate.proto b/core/proto/android/view/insetsstate.proto new file mode 100644 index 0000000000000..9e9933d72c6c1 --- /dev/null +++ b/core/proto/android/view/insetsstate.proto @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2020 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/view/insetssource.proto"; +import "frameworks/base/core/proto/android/graphics/rect.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.InsetsState} object. + */ +message InsetsStateProto { + repeated InsetsSourceProto sources = 1; + optional .android.graphics.RectProto display_frame = 2; +} \ No newline at end of file diff --git a/core/proto/android/view/viewrootimpl.proto b/core/proto/android/view/viewrootimpl.proto new file mode 100644 index 0000000000000..0abe5e0624e32 --- /dev/null +++ b/core/proto/android/view/viewrootimpl.proto @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2020 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/graphics/rect.proto"; +import "frameworks/base/core/proto/android/view/displaycutout.proto"; +import "frameworks/base/core/proto/android/view/windowlayoutparams.proto"; + +package android.view; + +option java_multiple_files = true; + +/** + * Represents a {@link android.view.ViewRootImpl} object. + */ +message ViewRootImplProto { + optional string view = 1; + optional int32 display_id = 2; + optional bool app_visible = 3; + optional int32 width = 4; + optional int32 height = 5; + optional bool is_animating = 6; + optional .android.graphics.RectProto visible_rect = 7; + optional bool is_drawing = 8; + optional bool added = 9; + optional .android.graphics.RectProto win_frame = 10; + optional DisplayCutoutProto pending_display_cutout = 11; + optional string last_window_insets = 12; + optional string soft_input_mode = 13; + optional int32 scroll_y = 14; + optional int32 cur_scroll_y = 15; + optional bool removed = 16; + optional .android.view.WindowLayoutParamsProto window_attributes = 17; +} \ No newline at end of file