| 1 |
/* |
| 2 |
* Copyright (C) 2020 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 |
|
| 17 |
syntax = "proto2"; |
| 18 |
option java_outer_classname = "InputMethodEditorTraceProto"; |
| 19 |
|
| 20 |
package android.view.inputmethod; |
| 21 |
|
| 22 |
import "frameworks/base/core/proto/android/view/inputmethod/inputmethodmanager.proto"; |
| 23 |
import "frameworks/base/core/proto/android/view/viewrootimpl.proto"; |
| 24 |
import "frameworks/base/core/proto/android/view/insetscontroller.proto"; |
| 25 |
import "frameworks/base/core/proto/android/view/imeinsetssourceconsumer.proto"; |
| 26 |
import "frameworks/base/core/proto/android/view/inputmethod/editorinfo.proto"; |
| 27 |
import "frameworks/base/core/proto/android/view/inputmethod/inputconnection.proto"; |
| 28 |
import "frameworks/base/core/proto/android/view/imefocuscontroller.proto"; |
| 29 |
|
| 30 |
import "frameworks/base/core/proto/android/server/inputmethod/inputmethodmanagerservice.proto"; |
| 31 |
import "frameworks/base/core/proto/android/inputmethodservice/inputmethodservice.proto"; |
| 32 |
|
| 33 |
/** |
| 34 |
* Represents a file full of trace entries for clients that use InputMethod. |
| 35 |
* Encoded, it should start with 0x9 0x49 0x4d 0x43 0x54 0x52 0x41 0x43 0x45 (.IMCTRACE), such |
| 36 |
* that they can be easily identified. |
| 37 |
*/ |
| 38 |
message InputMethodClientsTraceFileProto { |
| 39 |
|
| 40 |
/* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L |
| 41 |
(this is needed because enums have to be 32 bits and there's no nice way to put 64bit |
| 42 |
constants into .proto files.) */ |
| 43 |
enum MagicNumber { |
| 44 |
INVALID = 0; |
| 45 |
MAGIC_NUMBER_L = 0x54434d49; /* IMCT (little-endian ASCII) */ |
| 46 |
MAGIC_NUMBER_H = 0x45434152; /* RACE (little-endian ASCII) */ |
| 47 |
} |
| 48 |
|
| 49 |
/* Must be the first field to allow winscope to auto-detect the dump type. Set to value |
| 50 |
in MagicNumber */ |
| 51 |
optional fixed64 magic_number = 1; |
| 52 |
repeated InputMethodClientsTraceProto entry = 2; |
| 53 |
} |
| 54 |
|
| 55 |
/* One dump entry for clients that use InputMethod. */ |
| 56 |
message InputMethodClientsTraceProto { |
| 57 |
/* required: elapsed realtime in nanos since boot of when this entry was logged */ |
| 58 |
optional fixed64 elapsed_realtime_nanos = 1; |
| 59 |
|
| 60 |
/* where the trace originated */ |
| 61 |
optional string where = 2; |
| 62 |
|
| 63 |
optional ClientSideProto client = 3; |
| 64 |
|
| 65 |
/* groups together the dump from ime related client side classes */ |
| 66 |
message ClientSideProto { |
| 67 |
optional int32 display_id = 1; |
| 68 |
optional InputMethodManagerProto input_method_manager = 2; |
| 69 |
optional ViewRootImplProto view_root_impl = 3; |
| 70 |
optional InsetsControllerProto insets_controller = 4; |
| 71 |
optional ImeInsetsSourceConsumerProto ime_insets_source_consumer = 5; |
| 72 |
optional EditorInfoProto editor_info = 6; |
| 73 |
optional ImeFocusControllerProto ime_focus_controller = 7; |
| 74 |
optional InputConnectionProto input_connection = 8; |
| 75 |
optional InputConnectionCallProto input_connection_call = 9; |
| 76 |
} |
| 77 |
} |
| 78 |
|
| 79 |
/** |
| 80 |
* Represents a file full of InputMethodService trace entries. |
| 81 |
* Encoded, it should start with 0x9 0x49 0x4d 0x53 0x54 0x52 0x41 0x43 0x45 (.IMSTRACE), such |
| 82 |
* that they can be easily identified. |
| 83 |
*/ |
| 84 |
message InputMethodServiceTraceFileProto { |
| 85 |
|
| 86 |
/* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L |
| 87 |
(this is needed because enums have to be 32 bits and there's no nice way to put 64bit |
| 88 |
constants into .proto files.) */ |
| 89 |
enum MagicNumber { |
| 90 |
INVALID = 0; |
| 91 |
MAGIC_NUMBER_L = 0x54534d49; /* IMST (little-endian ASCII) */ |
| 92 |
MAGIC_NUMBER_H = 0x45434152; /* RACE (little-endian ASCII) */ |
| 93 |
} |
| 94 |
|
| 95 |
/* Must be the first field to allow winscope to auto-detect the dump type. Set to value |
| 96 |
in MagicNumber */ |
| 97 |
optional fixed64 magic_number = 1; |
| 98 |
repeated InputMethodServiceTraceProto entry = 2; |
| 99 |
} |
| 100 |
|
| 101 |
/* One dump entry for InputMethodService. */ |
| 102 |
message InputMethodServiceTraceProto { |
| 103 |
/* required: elapsed realtime in nanos since boot of when this entry was logged */ |
| 104 |
optional fixed64 elapsed_realtime_nanos = 1; |
| 105 |
|
| 106 |
/* where the trace originated */ |
| 107 |
optional string where = 2; |
| 108 |
|
| 109 |
optional .android.inputmethodservice.InputMethodServiceProto input_method_service = 3; |
| 110 |
} |
| 111 |
|
| 112 |
/** |
| 113 |
* Represents a file full of InputMethodManagerService trace entries. |
| 114 |
* Encoded, it should start with 0x9 0x49 0x4d 0x4d 0x54 0x52 0x41 0x43 0x45 (.IMMTRACE), such |
| 115 |
* that they can be easily identified. |
| 116 |
*/ |
| 117 |
message InputMethodManagerServiceTraceFileProto { |
| 118 |
|
| 119 |
/* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L |
| 120 |
(this is needed because enums have to be 32 bits and there's no nice way to put 64bit |
| 121 |
constants into .proto files.) */ |
| 122 |
enum MagicNumber { |
| 123 |
INVALID = 0; |
| 124 |
MAGIC_NUMBER_L = 0x544d4d49; /* IMMT (little-endian ASCII) */ |
| 125 |
MAGIC_NUMBER_H = 0x45434152; /* RACE (little-endian ASCII) */ |
| 126 |
} |
| 127 |
|
| 128 |
/* Must be the first field to allow winscope to auto-detect the dump type. Set to value |
| 129 |
in MagicNumber */ |
| 130 |
optional fixed64 magic_number = 1; |
| 131 |
repeated InputMethodManagerServiceTraceProto entry = 2; |
| 132 |
} |
| 133 |
|
| 134 |
/* One dump entry for InputMethodManagerService. */ |
| 135 |
message InputMethodManagerServiceTraceProto { |
| 136 |
/* required: elapsed realtime in nanos since boot of when this entry was logged */ |
| 137 |
optional fixed64 elapsed_realtime_nanos = 1; |
| 138 |
|
| 139 |
/* where the trace originated */ |
| 140 |
optional string where = 2; |
| 141 |
|
| 142 |
optional .android.server.inputmethod.InputMethodManagerServiceProto input_method_manager_service = 3; |
| 143 |
} |