1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: frameworks/proto_logging/stats/atoms/input/input_extension_atoms.proto
3
4 #include "frameworks/proto_logging/stats/atoms/input/input_extension_atoms.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18
19 PROTOBUF_PRAGMA_INIT_SEG
20
21 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
22 namespace _pbi = _pb::internal;
23
24 namespace android {
25 namespace os {
26 namespace statsd {
27 namespace input {
KeyboardLayoutConfig(::_pbi::ConstantInitialized)28 PROTOBUF_CONSTEXPR KeyboardLayoutConfig::KeyboardLayoutConfig(
29 ::_pbi::ConstantInitialized): _impl_{
30 /*decltype(_impl_._has_bits_)*/{}
31 , /*decltype(_impl_._cached_size_)*/{}
32 , /*decltype(_impl_.keyboard_language_tag_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
33 , /*decltype(_impl_.keyboard_layout_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
34 , /*decltype(_impl_.ime_language_tag_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
35 , /*decltype(_impl_.keyboard_layout_type_)*/0
36 , /*decltype(_impl_.layout_selection_criteria_)*/0
37 , /*decltype(_impl_.ime_layout_type_)*/0} {}
38 struct KeyboardLayoutConfigDefaultTypeInternal {
KeyboardLayoutConfigDefaultTypeInternalandroid::os::statsd::input::KeyboardLayoutConfigDefaultTypeInternal39 PROTOBUF_CONSTEXPR KeyboardLayoutConfigDefaultTypeInternal()
40 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyboardLayoutConfigDefaultTypeInternalandroid::os::statsd::input::KeyboardLayoutConfigDefaultTypeInternal41 ~KeyboardLayoutConfigDefaultTypeInternal() {}
42 union { // NOLINT(misc-non-private-member-variables-in-classes)
43 KeyboardLayoutConfig _instance;
44 };
45 };
46 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyboardLayoutConfigDefaultTypeInternal _KeyboardLayoutConfig_default_instance_;
RepeatedKeyboardLayoutConfig(::_pbi::ConstantInitialized)47 PROTOBUF_CONSTEXPR RepeatedKeyboardLayoutConfig::RepeatedKeyboardLayoutConfig(
48 ::_pbi::ConstantInitialized): _impl_{
49 /*decltype(_impl_.keyboard_layout_config_)*/{}
50 , /*decltype(_impl_._cached_size_)*/{}} {}
51 struct RepeatedKeyboardLayoutConfigDefaultTypeInternal {
RepeatedKeyboardLayoutConfigDefaultTypeInternalandroid::os::statsd::input::RepeatedKeyboardLayoutConfigDefaultTypeInternal52 PROTOBUF_CONSTEXPR RepeatedKeyboardLayoutConfigDefaultTypeInternal()
53 : _instance(::_pbi::ConstantInitialized{}) {}
~RepeatedKeyboardLayoutConfigDefaultTypeInternalandroid::os::statsd::input::RepeatedKeyboardLayoutConfigDefaultTypeInternal54 ~RepeatedKeyboardLayoutConfigDefaultTypeInternal() {}
55 union { // NOLINT(misc-non-private-member-variables-in-classes)
56 RepeatedKeyboardLayoutConfig _instance;
57 };
58 };
59 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RepeatedKeyboardLayoutConfigDefaultTypeInternal _RepeatedKeyboardLayoutConfig_default_instance_;
KeyboardConfigured(::_pbi::ConstantInitialized)60 PROTOBUF_CONSTEXPR KeyboardConfigured::KeyboardConfigured(
61 ::_pbi::ConstantInitialized): _impl_{
62 /*decltype(_impl_._has_bits_)*/{}
63 , /*decltype(_impl_._cached_size_)*/{}
64 , /*decltype(_impl_.repeated_keyboard_layout_config_)*/nullptr
65 , /*decltype(_impl_.is_first_time_configuration_)*/false
66 , /*decltype(_impl_.vendor_id_)*/0
67 , /*decltype(_impl_.product_id_)*/0
68 , /*decltype(_impl_.device_bus_)*/0} {}
69 struct KeyboardConfiguredDefaultTypeInternal {
KeyboardConfiguredDefaultTypeInternalandroid::os::statsd::input::KeyboardConfiguredDefaultTypeInternal70 PROTOBUF_CONSTEXPR KeyboardConfiguredDefaultTypeInternal()
71 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyboardConfiguredDefaultTypeInternalandroid::os::statsd::input::KeyboardConfiguredDefaultTypeInternal72 ~KeyboardConfiguredDefaultTypeInternal() {}
73 union { // NOLINT(misc-non-private-member-variables-in-classes)
74 KeyboardConfigured _instance;
75 };
76 };
77 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyboardConfiguredDefaultTypeInternal _KeyboardConfigured_default_instance_;
KeyboardSystemsEventReported(::_pbi::ConstantInitialized)78 PROTOBUF_CONSTEXPR KeyboardSystemsEventReported::KeyboardSystemsEventReported(
79 ::_pbi::ConstantInitialized): _impl_{
80 /*decltype(_impl_._has_bits_)*/{}
81 , /*decltype(_impl_._cached_size_)*/{}
82 , /*decltype(_impl_.key_code_)*/{}
83 , /*decltype(_impl_.vendor_id_)*/0
84 , /*decltype(_impl_.product_id_)*/0
85 , /*decltype(_impl_.keyboard_system_event_)*/0
86 , /*decltype(_impl_.modifier_state_)*/0
87 , /*decltype(_impl_.device_bus_)*/0} {}
88 struct KeyboardSystemsEventReportedDefaultTypeInternal {
KeyboardSystemsEventReportedDefaultTypeInternalandroid::os::statsd::input::KeyboardSystemsEventReportedDefaultTypeInternal89 PROTOBUF_CONSTEXPR KeyboardSystemsEventReportedDefaultTypeInternal()
90 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyboardSystemsEventReportedDefaultTypeInternalandroid::os::statsd::input::KeyboardSystemsEventReportedDefaultTypeInternal91 ~KeyboardSystemsEventReportedDefaultTypeInternal() {}
92 union { // NOLINT(misc-non-private-member-variables-in-classes)
93 KeyboardSystemsEventReported _instance;
94 };
95 };
96 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyboardSystemsEventReportedDefaultTypeInternal _KeyboardSystemsEventReported_default_instance_;
InputDeviceUsageReported(::_pbi::ConstantInitialized)97 PROTOBUF_CONSTEXPR InputDeviceUsageReported::InputDeviceUsageReported(
98 ::_pbi::ConstantInitialized): _impl_{
99 /*decltype(_impl_._has_bits_)*/{}
100 , /*decltype(_impl_._cached_size_)*/{}
101 , /*decltype(_impl_.usage_sources_)*/{}
102 , /*decltype(_impl_.usage_durations_per_source_)*/{}
103 , /*decltype(_impl_.uids_)*/{}
104 , /*decltype(_impl_.usage_durations_per_uid_)*/{}
105 , /*decltype(_impl_.vendor_id_)*/0
106 , /*decltype(_impl_.product_id_)*/0
107 , /*decltype(_impl_.version_id_)*/0
108 , /*decltype(_impl_.device_bus_)*/0
109 , /*decltype(_impl_.usage_duration_millis_)*/0} {}
110 struct InputDeviceUsageReportedDefaultTypeInternal {
InputDeviceUsageReportedDefaultTypeInternalandroid::os::statsd::input::InputDeviceUsageReportedDefaultTypeInternal111 PROTOBUF_CONSTEXPR InputDeviceUsageReportedDefaultTypeInternal()
112 : _instance(::_pbi::ConstantInitialized{}) {}
~InputDeviceUsageReportedDefaultTypeInternalandroid::os::statsd::input::InputDeviceUsageReportedDefaultTypeInternal113 ~InputDeviceUsageReportedDefaultTypeInternal() {}
114 union { // NOLINT(misc-non-private-member-variables-in-classes)
115 InputDeviceUsageReported _instance;
116 };
117 };
118 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InputDeviceUsageReportedDefaultTypeInternal _InputDeviceUsageReported_default_instance_;
TouchpadUsage(::_pbi::ConstantInitialized)119 PROTOBUF_CONSTEXPR TouchpadUsage::TouchpadUsage(
120 ::_pbi::ConstantInitialized): _impl_{
121 /*decltype(_impl_._has_bits_)*/{}
122 , /*decltype(_impl_._cached_size_)*/{}
123 , /*decltype(_impl_.vendor_id_)*/0
124 , /*decltype(_impl_.product_id_)*/0
125 , /*decltype(_impl_.version_id_)*/0
126 , /*decltype(_impl_.device_bus_)*/0
127 , /*decltype(_impl_.finger_count_)*/0
128 , /*decltype(_impl_.palm_count_)*/0
129 , /*decltype(_impl_.two_finger_swipe_gesture_count_)*/0
130 , /*decltype(_impl_.three_finger_swipe_gesture_count_)*/0
131 , /*decltype(_impl_.four_finger_swipe_gesture_count_)*/0
132 , /*decltype(_impl_.pinch_gesture_count_)*/0} {}
133 struct TouchpadUsageDefaultTypeInternal {
TouchpadUsageDefaultTypeInternalandroid::os::statsd::input::TouchpadUsageDefaultTypeInternal134 PROTOBUF_CONSTEXPR TouchpadUsageDefaultTypeInternal()
135 : _instance(::_pbi::ConstantInitialized{}) {}
~TouchpadUsageDefaultTypeInternalandroid::os::statsd::input::TouchpadUsageDefaultTypeInternal136 ~TouchpadUsageDefaultTypeInternal() {}
137 union { // NOLINT(misc-non-private-member-variables-in-classes)
138 TouchpadUsage _instance;
139 };
140 };
141 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TouchpadUsageDefaultTypeInternal _TouchpadUsage_default_instance_;
InputEventLatencyReported(::_pbi::ConstantInitialized)142 PROTOBUF_CONSTEXPR InputEventLatencyReported::InputEventLatencyReported(
143 ::_pbi::ConstantInitialized): _impl_{
144 /*decltype(_impl_._has_bits_)*/{}
145 , /*decltype(_impl_._cached_size_)*/{}
146 , /*decltype(_impl_.sources_)*/{}
147 , /*decltype(_impl_.histogram_counts_)*/{}
148 , /*decltype(_impl_.vendor_id_)*/0
149 , /*decltype(_impl_.product_id_)*/0
150 , /*decltype(_impl_.input_event_type_)*/0
151 , /*decltype(_impl_.latency_stage_)*/0
152 , /*decltype(_impl_.histogram_version_)*/0} {}
153 struct InputEventLatencyReportedDefaultTypeInternal {
InputEventLatencyReportedDefaultTypeInternalandroid::os::statsd::input::InputEventLatencyReportedDefaultTypeInternal154 PROTOBUF_CONSTEXPR InputEventLatencyReportedDefaultTypeInternal()
155 : _instance(::_pbi::ConstantInitialized{}) {}
~InputEventLatencyReportedDefaultTypeInternalandroid::os::statsd::input::InputEventLatencyReportedDefaultTypeInternal156 ~InputEventLatencyReportedDefaultTypeInternal() {}
157 union { // NOLINT(misc-non-private-member-variables-in-classes)
158 InputEventLatencyReported _instance;
159 };
160 };
161 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InputEventLatencyReportedDefaultTypeInternal _InputEventLatencyReported_default_instance_;
162 } // namespace input
163 } // namespace statsd
164 } // namespace os
165 } // namespace android
166 static ::_pb::Metadata file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[7];
167 static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto = nullptr;
168 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto = nullptr;
169
170 const ::uint32_t TableStruct_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
171 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_._has_bits_),
172 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _internal_metadata_),
173 ~0u, // no _extensions_
174 ~0u, // no _oneof_case_
175 ~0u, // no _weak_field_map_
176 ~0u, // no _inlined_string_donated_
177 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_.keyboard_layout_type_),
178 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_.keyboard_language_tag_),
179 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_.keyboard_layout_name_),
180 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_.layout_selection_criteria_),
181 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_.ime_layout_type_),
182 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardLayoutConfig, _impl_.ime_language_tag_),
183 3,
184 0,
185 1,
186 4,
187 5,
188 2,
189 ~0u, // no _has_bits_
190 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::RepeatedKeyboardLayoutConfig, _internal_metadata_),
191 ~0u, // no _extensions_
192 ~0u, // no _oneof_case_
193 ~0u, // no _weak_field_map_
194 ~0u, // no _inlined_string_donated_
195 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::RepeatedKeyboardLayoutConfig, _impl_.keyboard_layout_config_),
196 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _impl_._has_bits_),
197 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _internal_metadata_),
198 ~0u, // no _extensions_
199 ~0u, // no _oneof_case_
200 ~0u, // no _weak_field_map_
201 ~0u, // no _inlined_string_donated_
202 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _impl_.is_first_time_configuration_),
203 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _impl_.vendor_id_),
204 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _impl_.product_id_),
205 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _impl_.repeated_keyboard_layout_config_),
206 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardConfigured, _impl_.device_bus_),
207 1,
208 2,
209 3,
210 0,
211 4,
212 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_._has_bits_),
213 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _internal_metadata_),
214 ~0u, // no _extensions_
215 ~0u, // no _oneof_case_
216 ~0u, // no _weak_field_map_
217 ~0u, // no _inlined_string_donated_
218 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_.vendor_id_),
219 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_.product_id_),
220 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_.keyboard_system_event_),
221 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_.key_code_),
222 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_.modifier_state_),
223 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::KeyboardSystemsEventReported, _impl_.device_bus_),
224 0,
225 1,
226 2,
227 ~0u,
228 3,
229 4,
230 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_._has_bits_),
231 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _internal_metadata_),
232 ~0u, // no _extensions_
233 ~0u, // no _oneof_case_
234 ~0u, // no _weak_field_map_
235 ~0u, // no _inlined_string_donated_
236 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.vendor_id_),
237 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.product_id_),
238 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.version_id_),
239 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.device_bus_),
240 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.usage_duration_millis_),
241 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.usage_sources_),
242 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.usage_durations_per_source_),
243 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.uids_),
244 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputDeviceUsageReported, _impl_.usage_durations_per_uid_),
245 0,
246 1,
247 2,
248 3,
249 4,
250 ~0u,
251 ~0u,
252 ~0u,
253 ~0u,
254 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_._has_bits_),
255 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _internal_metadata_),
256 ~0u, // no _extensions_
257 ~0u, // no _oneof_case_
258 ~0u, // no _weak_field_map_
259 ~0u, // no _inlined_string_donated_
260 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.vendor_id_),
261 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.product_id_),
262 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.version_id_),
263 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.device_bus_),
264 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.finger_count_),
265 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.palm_count_),
266 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.two_finger_swipe_gesture_count_),
267 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.three_finger_swipe_gesture_count_),
268 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.four_finger_swipe_gesture_count_),
269 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::TouchpadUsage, _impl_.pinch_gesture_count_),
270 0,
271 1,
272 2,
273 3,
274 4,
275 5,
276 6,
277 7,
278 8,
279 9,
280 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_._has_bits_),
281 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _internal_metadata_),
282 ~0u, // no _extensions_
283 ~0u, // no _oneof_case_
284 ~0u, // no _weak_field_map_
285 ~0u, // no _inlined_string_donated_
286 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.vendor_id_),
287 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.product_id_),
288 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.sources_),
289 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.input_event_type_),
290 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.latency_stage_),
291 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.histogram_version_),
292 PROTOBUF_FIELD_OFFSET(::android::os::statsd::input::InputEventLatencyReported, _impl_.histogram_counts_),
293 0,
294 1,
295 ~0u,
296 2,
297 3,
298 4,
299 ~0u,
300 };
301 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
302 { 0, 12, -1, sizeof(::android::os::statsd::input::KeyboardLayoutConfig)},
303 { 18, -1, -1, sizeof(::android::os::statsd::input::RepeatedKeyboardLayoutConfig)},
304 { 25, 36, -1, sizeof(::android::os::statsd::input::KeyboardConfigured)},
305 { 41, 53, -1, sizeof(::android::os::statsd::input::KeyboardSystemsEventReported)},
306 { 59, 74, -1, sizeof(::android::os::statsd::input::InputDeviceUsageReported)},
307 { 83, 99, -1, sizeof(::android::os::statsd::input::TouchpadUsage)},
308 { 109, 122, -1, sizeof(::android::os::statsd::input::InputEventLatencyReported)},
309 };
310
311 static const ::_pb::Message* const file_default_instances[] = {
312 &::android::os::statsd::input::_KeyboardLayoutConfig_default_instance_._instance,
313 &::android::os::statsd::input::_RepeatedKeyboardLayoutConfig_default_instance_._instance,
314 &::android::os::statsd::input::_KeyboardConfigured_default_instance_._instance,
315 &::android::os::statsd::input::_KeyboardSystemsEventReported_default_instance_._instance,
316 &::android::os::statsd::input::_InputDeviceUsageReported_default_instance_._instance,
317 &::android::os::statsd::input::_TouchpadUsage_default_instance_._instance,
318 &::android::os::statsd::input::_InputEventLatencyReported_default_instance_._instance,
319 };
320
321 const char descriptor_table_protodef_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
322 "\nFframeworks/proto_logging/stats/atoms/i"
323 "nput/input_extension_atoms.proto\022\027androi"
324 "d.os.statsd.input\032*frameworks/proto_logg"
325 "ing/stats/atoms.proto\0327frameworks/proto_"
326 "logging/stats/atom_field_options.proto\0326"
327 "frameworks/proto_logging/stats/enums/inp"
328 "ut/enums.proto\"\307\001\n\024KeyboardLayoutConfig\022"
329 "\034\n\024keyboard_layout_type\030\001 \001(\005\022\035\n\025keyboar"
330 "d_language_tag\030\002 \001(\t\022\034\n\024keyboard_layout_"
331 "name\030\003 \001(\t\022!\n\031layout_selection_criteria\030"
332 "\004 \001(\005\022\027\n\017ime_layout_type\030\005 \001(\005\022\030\n\020ime_la"
333 "nguage_tag\030\006 \001(\t\"m\n\034RepeatedKeyboardLayo"
334 "utConfig\022M\n\026keyboard_layout_config\030\001 \003(\013"
335 "2-.android.os.statsd.input.KeyboardLayou"
336 "tConfig\"\371\001\n\022KeyboardConfigured\022#\n\033is_fir"
337 "st_time_configuration\030\001 \001(\010\022\021\n\tvendor_id"
338 "\030\002 \001(\005\022\022\n\nproduct_id\030\003 \001(\005\022d\n\037repeated_k"
339 "eyboard_layout_config\030\004 \001(\01325.android.os"
340 ".statsd.input.RepeatedKeyboardLayoutConf"
341 "igB\004\220\265\030\002\0221\n\ndevice_bus\030\005 \001(\0162\035.android.i"
342 "nput.InputDeviceBus\"\345\001\n\034KeyboardSystemsE"
343 "ventReported\022\021\n\tvendor_id\030\001 \001(\005\022\022\n\nprodu"
344 "ct_id\030\002 \001(\005\022A\n\025keyboard_system_event\030\003 \001"
345 "(\0162\".android.input.KeyboardSystemEvent\022\020"
346 "\n\010key_code\030\004 \003(\005\022\026\n\016modifier_state\030\005 \001(\005"
347 "\0221\n\ndevice_bus\030\006 \001(\0162\035.android.input.Inp"
348 "utDeviceBus\"\274\002\n\030InputDeviceUsageReported"
349 "\022\021\n\tvendor_id\030\001 \001(\005\022\022\n\nproduct_id\030\002 \001(\005\022"
350 "\022\n\nversion_id\030\003 \001(\005\0221\n\ndevice_bus\030\004 \001(\0162"
351 "\035.android.input.InputDeviceBus\022\035\n\025usage_"
352 "duration_millis\030\005 \001(\005\022:\n\rusage_sources\030\006"
353 " \003(\0162#.android.input.InputDeviceUsageTyp"
354 "e\022\"\n\032usage_durations_per_source\030\007 \003(\005\022\022\n"
355 "\004uids\030\010 \003(\005B\004\210\265\030\001\022\037\n\027usage_durations_per"
356 "_uid\030\t \003(\005\"\277\002\n\rTouchpadUsage\022\021\n\tvendor_i"
357 "d\030\001 \001(\005\022\022\n\nproduct_id\030\002 \001(\005\022\022\n\nversion_i"
358 "d\030\003 \001(\005\0221\n\ndevice_bus\030\004 \001(\0162\035.android.in"
359 "put.InputDeviceBus\022\024\n\014finger_count\030\005 \001(\005"
360 "\022\022\n\npalm_count\030\006 \001(\005\022&\n\036two_finger_swipe"
361 "_gesture_count\030\007 \001(\005\022(\n three_finger_swi"
362 "pe_gesture_count\030\010 \001(\005\022\'\n\037four_finger_sw"
363 "ipe_gesture_count\030\t \001(\005\022\033\n\023pinch_gesture"
364 "_count\030\n \001(\005\"\232\002\n\031InputEventLatencyReport"
365 "ed\022\021\n\tvendor_id\030\001 \001(\005\022\022\n\nproduct_id\030\002 \001("
366 "\005\0224\n\007sources\030\003 \003(\0162#.android.input.Input"
367 "DeviceUsageType\0227\n\020input_event_type\030\004 \001("
368 "\0162\035.android.input.InputEventType\0222\n\rlate"
369 "ncy_stage\030\005 \001(\0162\033.android.input.LatencyS"
370 "tage\022\031\n\021histogram_version\030\006 \001(\005\022\030\n\020histo"
371 "gram_counts\030\007 \003(\005:q\n\023keyboard_configured"
372 "\022\027.android.os.statsd.Atom\030\252\005 \001(\0132+.andro"
373 "id.os.statsd.input.KeyboardConfiguredB\r\242"
374 "\265\030\tframework:\207\001\n\037keyboard_systems_event_"
375 "reported\022\027.android.os.statsd.Atom\030\253\005 \001(\013"
376 "25.android.os.statsd.input.KeyboardSyste"
377 "msEventReportedB\r\242\265\030\tframework:~\n\032inputd"
378 "evice_usage_reported\022\027.android.os.statsd"
379 ".Atom\030\256\005 \001(\01321.android.os.statsd.input.I"
380 "nputDeviceUsageReportedB\r\242\265\030\tframework:\201"
381 "\001\n\034input_event_latency_reported\022\027.androi"
382 "d.os.statsd.Atom\030\244\007 \001(\01322.android.os.sta"
383 "tsd.input.InputEventLatencyReportedB\r\242\265\030"
384 "\tframework:g\n\016touchpad_usage\022\027.android.o"
385 "s.statsd.Atom\030\317O \001(\0132&.android.os.statsd"
386 ".input.TouchpadUsageB\r\242\265\030\tframeworkB\030\n\024c"
387 "om.android.os.inputP\001"
388 ;
389 static const ::_pbi::DescriptorTable* const descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_deps[3] = {
390 &::descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatom_5ffield_5foptions_2eproto,
391 &::descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2eproto,
392 &::descriptor_table_frameworks_2fproto_5flogging_2fstats_2fenums_2finput_2fenums_2eproto,
393 };
394 static ::_pbi::once_flag descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once;
395 const ::_pbi::DescriptorTable descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto = {
396 false, false, 2621, descriptor_table_protodef_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto,
397 "frameworks/proto_logging/stats/atoms/input/input_extension_atoms.proto",
398 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once, descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_deps, 3, 7,
399 schemas, file_default_instances, TableStruct_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto::offsets,
400 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto, file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto,
401 file_level_service_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto,
402 };
descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter()403 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter() {
404 return &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto;
405 }
406
407 // Force running AddDescriptors() at dynamic initialization time.
408 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto(&descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto);
409 namespace android {
410 namespace os {
411 namespace statsd {
412 namespace input {
413
414 // ===================================================================
415
416 class KeyboardLayoutConfig::_Internal {
417 public:
418 using HasBits = decltype(std::declval<KeyboardLayoutConfig>()._impl_._has_bits_);
set_has_keyboard_layout_type(HasBits * has_bits)419 static void set_has_keyboard_layout_type(HasBits* has_bits) {
420 (*has_bits)[0] |= 8u;
421 }
set_has_keyboard_language_tag(HasBits * has_bits)422 static void set_has_keyboard_language_tag(HasBits* has_bits) {
423 (*has_bits)[0] |= 1u;
424 }
set_has_keyboard_layout_name(HasBits * has_bits)425 static void set_has_keyboard_layout_name(HasBits* has_bits) {
426 (*has_bits)[0] |= 2u;
427 }
set_has_layout_selection_criteria(HasBits * has_bits)428 static void set_has_layout_selection_criteria(HasBits* has_bits) {
429 (*has_bits)[0] |= 16u;
430 }
set_has_ime_layout_type(HasBits * has_bits)431 static void set_has_ime_layout_type(HasBits* has_bits) {
432 (*has_bits)[0] |= 32u;
433 }
set_has_ime_language_tag(HasBits * has_bits)434 static void set_has_ime_language_tag(HasBits* has_bits) {
435 (*has_bits)[0] |= 4u;
436 }
437 };
438
KeyboardLayoutConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)439 KeyboardLayoutConfig::KeyboardLayoutConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
440 bool is_message_owned)
441 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
442 SharedCtor(arena, is_message_owned);
443 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.KeyboardLayoutConfig)
444 }
KeyboardLayoutConfig(const KeyboardLayoutConfig & from)445 KeyboardLayoutConfig::KeyboardLayoutConfig(const KeyboardLayoutConfig& from)
446 : ::PROTOBUF_NAMESPACE_ID::Message() {
447 KeyboardLayoutConfig* const _this = this; (void)_this;
448 new (&_impl_) Impl_{
449 decltype(_impl_._has_bits_){from._impl_._has_bits_}
450 , /*decltype(_impl_._cached_size_)*/{}
451 , decltype(_impl_.keyboard_language_tag_){}
452 , decltype(_impl_.keyboard_layout_name_){}
453 , decltype(_impl_.ime_language_tag_){}
454 , decltype(_impl_.keyboard_layout_type_){}
455 , decltype(_impl_.layout_selection_criteria_){}
456 , decltype(_impl_.ime_layout_type_){}};
457
458 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
459 _impl_.keyboard_language_tag_.InitDefault();
460 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
461 _impl_.keyboard_language_tag_.Set("", GetArenaForAllocation());
462 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
463 if (from._internal_has_keyboard_language_tag()) {
464 _this->_impl_.keyboard_language_tag_.Set(from._internal_keyboard_language_tag(),
465 _this->GetArenaForAllocation());
466 }
467 _impl_.keyboard_layout_name_.InitDefault();
468 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
469 _impl_.keyboard_layout_name_.Set("", GetArenaForAllocation());
470 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
471 if (from._internal_has_keyboard_layout_name()) {
472 _this->_impl_.keyboard_layout_name_.Set(from._internal_keyboard_layout_name(),
473 _this->GetArenaForAllocation());
474 }
475 _impl_.ime_language_tag_.InitDefault();
476 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
477 _impl_.ime_language_tag_.Set("", GetArenaForAllocation());
478 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
479 if (from._internal_has_ime_language_tag()) {
480 _this->_impl_.ime_language_tag_.Set(from._internal_ime_language_tag(),
481 _this->GetArenaForAllocation());
482 }
483 ::memcpy(&_impl_.keyboard_layout_type_, &from._impl_.keyboard_layout_type_,
484 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.ime_layout_type_) -
485 reinterpret_cast<char*>(&_impl_.keyboard_layout_type_)) + sizeof(_impl_.ime_layout_type_));
486 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.KeyboardLayoutConfig)
487 }
488
SharedCtor(::_pb::Arena * arena,bool is_message_owned)489 inline void KeyboardLayoutConfig::SharedCtor(
490 ::_pb::Arena* arena, bool is_message_owned) {
491 (void)arena;
492 (void)is_message_owned;
493 new (&_impl_) Impl_{
494 decltype(_impl_._has_bits_){}
495 , /*decltype(_impl_._cached_size_)*/{}
496 , decltype(_impl_.keyboard_language_tag_){}
497 , decltype(_impl_.keyboard_layout_name_){}
498 , decltype(_impl_.ime_language_tag_){}
499 , decltype(_impl_.keyboard_layout_type_){0}
500 , decltype(_impl_.layout_selection_criteria_){0}
501 , decltype(_impl_.ime_layout_type_){0}
502 };
503 _impl_.keyboard_language_tag_.InitDefault();
504 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
505 _impl_.keyboard_language_tag_.Set("", GetArenaForAllocation());
506 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
507 _impl_.keyboard_layout_name_.InitDefault();
508 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
509 _impl_.keyboard_layout_name_.Set("", GetArenaForAllocation());
510 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
511 _impl_.ime_language_tag_.InitDefault();
512 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
513 _impl_.ime_language_tag_.Set("", GetArenaForAllocation());
514 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
515 }
516
~KeyboardLayoutConfig()517 KeyboardLayoutConfig::~KeyboardLayoutConfig() {
518 // @@protoc_insertion_point(destructor:android.os.statsd.input.KeyboardLayoutConfig)
519 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
520 (void)arena;
521 return;
522 }
523 SharedDtor();
524 }
525
SharedDtor()526 inline void KeyboardLayoutConfig::SharedDtor() {
527 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
528 _impl_.keyboard_language_tag_.Destroy();
529 _impl_.keyboard_layout_name_.Destroy();
530 _impl_.ime_language_tag_.Destroy();
531 }
532
SetCachedSize(int size) const533 void KeyboardLayoutConfig::SetCachedSize(int size) const {
534 _impl_._cached_size_.Set(size);
535 }
536
Clear()537 void KeyboardLayoutConfig::Clear() {
538 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.KeyboardLayoutConfig)
539 ::uint32_t cached_has_bits = 0;
540 // Prevent compiler warnings about cached_has_bits being unused
541 (void) cached_has_bits;
542
543 cached_has_bits = _impl_._has_bits_[0];
544 if (cached_has_bits & 0x00000007u) {
545 if (cached_has_bits & 0x00000001u) {
546 _impl_.keyboard_language_tag_.ClearNonDefaultToEmpty();
547 }
548 if (cached_has_bits & 0x00000002u) {
549 _impl_.keyboard_layout_name_.ClearNonDefaultToEmpty();
550 }
551 if (cached_has_bits & 0x00000004u) {
552 _impl_.ime_language_tag_.ClearNonDefaultToEmpty();
553 }
554 }
555 if (cached_has_bits & 0x00000038u) {
556 ::memset(&_impl_.keyboard_layout_type_, 0, static_cast<size_t>(
557 reinterpret_cast<char*>(&_impl_.ime_layout_type_) -
558 reinterpret_cast<char*>(&_impl_.keyboard_layout_type_)) + sizeof(_impl_.ime_layout_type_));
559 }
560 _impl_._has_bits_.Clear();
561 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
562 }
563
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)564 const char* KeyboardLayoutConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
565 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
566 _Internal::HasBits has_bits{};
567 while (!ctx->Done(&ptr)) {
568 ::uint32_t tag;
569 ptr = ::_pbi::ReadTag(ptr, &tag);
570 switch (tag >> 3) {
571 // optional int32 keyboard_layout_type = 1;
572 case 1:
573 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
574 _Internal::set_has_keyboard_layout_type(&has_bits);
575 _impl_.keyboard_layout_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
576 CHK_(ptr);
577 } else {
578 goto handle_unusual;
579 }
580 continue;
581 // optional string keyboard_language_tag = 2;
582 case 2:
583 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
584 auto str = _internal_mutable_keyboard_language_tag();
585 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
586 CHK_(ptr);
587 #ifndef NDEBUG
588 ::_pbi::VerifyUTF8(str, "android.os.statsd.input.KeyboardLayoutConfig.keyboard_language_tag");
589 #endif // !NDEBUG
590 } else {
591 goto handle_unusual;
592 }
593 continue;
594 // optional string keyboard_layout_name = 3;
595 case 3:
596 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
597 auto str = _internal_mutable_keyboard_layout_name();
598 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
599 CHK_(ptr);
600 #ifndef NDEBUG
601 ::_pbi::VerifyUTF8(str, "android.os.statsd.input.KeyboardLayoutConfig.keyboard_layout_name");
602 #endif // !NDEBUG
603 } else {
604 goto handle_unusual;
605 }
606 continue;
607 // optional int32 layout_selection_criteria = 4;
608 case 4:
609 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
610 _Internal::set_has_layout_selection_criteria(&has_bits);
611 _impl_.layout_selection_criteria_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
612 CHK_(ptr);
613 } else {
614 goto handle_unusual;
615 }
616 continue;
617 // optional int32 ime_layout_type = 5;
618 case 5:
619 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
620 _Internal::set_has_ime_layout_type(&has_bits);
621 _impl_.ime_layout_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
622 CHK_(ptr);
623 } else {
624 goto handle_unusual;
625 }
626 continue;
627 // optional string ime_language_tag = 6;
628 case 6:
629 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
630 auto str = _internal_mutable_ime_language_tag();
631 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
632 CHK_(ptr);
633 #ifndef NDEBUG
634 ::_pbi::VerifyUTF8(str, "android.os.statsd.input.KeyboardLayoutConfig.ime_language_tag");
635 #endif // !NDEBUG
636 } else {
637 goto handle_unusual;
638 }
639 continue;
640 default:
641 goto handle_unusual;
642 } // switch
643 handle_unusual:
644 if ((tag == 0) || ((tag & 7) == 4)) {
645 CHK_(ptr);
646 ctx->SetLastTag(tag);
647 goto message_done;
648 }
649 ptr = UnknownFieldParse(
650 tag,
651 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
652 ptr, ctx);
653 CHK_(ptr != nullptr);
654 } // while
655 message_done:
656 _impl_._has_bits_.Or(has_bits);
657 return ptr;
658 failure:
659 ptr = nullptr;
660 goto message_done;
661 #undef CHK_
662 }
663
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const664 ::uint8_t* KeyboardLayoutConfig::_InternalSerialize(
665 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
666 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.KeyboardLayoutConfig)
667 ::uint32_t cached_has_bits = 0;
668 (void) cached_has_bits;
669
670 cached_has_bits = _impl_._has_bits_[0];
671 // optional int32 keyboard_layout_type = 1;
672 if (cached_has_bits & 0x00000008u) {
673 target = stream->EnsureSpace(target);
674 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_keyboard_layout_type(), target);
675 }
676
677 // optional string keyboard_language_tag = 2;
678 if (cached_has_bits & 0x00000001u) {
679 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
680 this->_internal_keyboard_language_tag().data(), static_cast<int>(this->_internal_keyboard_language_tag().length()),
681 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
682 "android.os.statsd.input.KeyboardLayoutConfig.keyboard_language_tag");
683 target = stream->WriteStringMaybeAliased(
684 2, this->_internal_keyboard_language_tag(), target);
685 }
686
687 // optional string keyboard_layout_name = 3;
688 if (cached_has_bits & 0x00000002u) {
689 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
690 this->_internal_keyboard_layout_name().data(), static_cast<int>(this->_internal_keyboard_layout_name().length()),
691 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
692 "android.os.statsd.input.KeyboardLayoutConfig.keyboard_layout_name");
693 target = stream->WriteStringMaybeAliased(
694 3, this->_internal_keyboard_layout_name(), target);
695 }
696
697 // optional int32 layout_selection_criteria = 4;
698 if (cached_has_bits & 0x00000010u) {
699 target = stream->EnsureSpace(target);
700 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_layout_selection_criteria(), target);
701 }
702
703 // optional int32 ime_layout_type = 5;
704 if (cached_has_bits & 0x00000020u) {
705 target = stream->EnsureSpace(target);
706 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_ime_layout_type(), target);
707 }
708
709 // optional string ime_language_tag = 6;
710 if (cached_has_bits & 0x00000004u) {
711 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
712 this->_internal_ime_language_tag().data(), static_cast<int>(this->_internal_ime_language_tag().length()),
713 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
714 "android.os.statsd.input.KeyboardLayoutConfig.ime_language_tag");
715 target = stream->WriteStringMaybeAliased(
716 6, this->_internal_ime_language_tag(), target);
717 }
718
719 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
720 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
721 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
722 }
723 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.KeyboardLayoutConfig)
724 return target;
725 }
726
ByteSizeLong() const727 size_t KeyboardLayoutConfig::ByteSizeLong() const {
728 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.KeyboardLayoutConfig)
729 size_t total_size = 0;
730
731 ::uint32_t cached_has_bits = 0;
732 // Prevent compiler warnings about cached_has_bits being unused
733 (void) cached_has_bits;
734
735 cached_has_bits = _impl_._has_bits_[0];
736 if (cached_has_bits & 0x0000003fu) {
737 // optional string keyboard_language_tag = 2;
738 if (cached_has_bits & 0x00000001u) {
739 total_size += 1 +
740 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
741 this->_internal_keyboard_language_tag());
742 }
743
744 // optional string keyboard_layout_name = 3;
745 if (cached_has_bits & 0x00000002u) {
746 total_size += 1 +
747 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
748 this->_internal_keyboard_layout_name());
749 }
750
751 // optional string ime_language_tag = 6;
752 if (cached_has_bits & 0x00000004u) {
753 total_size += 1 +
754 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
755 this->_internal_ime_language_tag());
756 }
757
758 // optional int32 keyboard_layout_type = 1;
759 if (cached_has_bits & 0x00000008u) {
760 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_keyboard_layout_type());
761 }
762
763 // optional int32 layout_selection_criteria = 4;
764 if (cached_has_bits & 0x00000010u) {
765 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_layout_selection_criteria());
766 }
767
768 // optional int32 ime_layout_type = 5;
769 if (cached_has_bits & 0x00000020u) {
770 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ime_layout_type());
771 }
772
773 }
774 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
775 }
776
777 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyboardLayoutConfig::_class_data_ = {
778 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
779 KeyboardLayoutConfig::MergeImpl
780 };
GetClassData() const781 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyboardLayoutConfig::GetClassData() const { return &_class_data_; }
782
783
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)784 void KeyboardLayoutConfig::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
785 auto* const _this = static_cast<KeyboardLayoutConfig*>(&to_msg);
786 auto& from = static_cast<const KeyboardLayoutConfig&>(from_msg);
787 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.KeyboardLayoutConfig)
788 GOOGLE_DCHECK_NE(&from, _this);
789 ::uint32_t cached_has_bits = 0;
790 (void) cached_has_bits;
791
792 cached_has_bits = from._impl_._has_bits_[0];
793 if (cached_has_bits & 0x0000003fu) {
794 if (cached_has_bits & 0x00000001u) {
795 _this->_internal_set_keyboard_language_tag(from._internal_keyboard_language_tag());
796 }
797 if (cached_has_bits & 0x00000002u) {
798 _this->_internal_set_keyboard_layout_name(from._internal_keyboard_layout_name());
799 }
800 if (cached_has_bits & 0x00000004u) {
801 _this->_internal_set_ime_language_tag(from._internal_ime_language_tag());
802 }
803 if (cached_has_bits & 0x00000008u) {
804 _this->_impl_.keyboard_layout_type_ = from._impl_.keyboard_layout_type_;
805 }
806 if (cached_has_bits & 0x00000010u) {
807 _this->_impl_.layout_selection_criteria_ = from._impl_.layout_selection_criteria_;
808 }
809 if (cached_has_bits & 0x00000020u) {
810 _this->_impl_.ime_layout_type_ = from._impl_.ime_layout_type_;
811 }
812 _this->_impl_._has_bits_[0] |= cached_has_bits;
813 }
814 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
815 }
816
CopyFrom(const KeyboardLayoutConfig & from)817 void KeyboardLayoutConfig::CopyFrom(const KeyboardLayoutConfig& from) {
818 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.KeyboardLayoutConfig)
819 if (&from == this) return;
820 Clear();
821 MergeFrom(from);
822 }
823
IsInitialized() const824 bool KeyboardLayoutConfig::IsInitialized() const {
825 return true;
826 }
827
InternalSwap(KeyboardLayoutConfig * other)828 void KeyboardLayoutConfig::InternalSwap(KeyboardLayoutConfig* other) {
829 using std::swap;
830 auto* lhs_arena = GetArenaForAllocation();
831 auto* rhs_arena = other->GetArenaForAllocation();
832 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
833 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
834 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
835 &_impl_.keyboard_language_tag_, lhs_arena,
836 &other->_impl_.keyboard_language_tag_, rhs_arena
837 );
838 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
839 &_impl_.keyboard_layout_name_, lhs_arena,
840 &other->_impl_.keyboard_layout_name_, rhs_arena
841 );
842 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
843 &_impl_.ime_language_tag_, lhs_arena,
844 &other->_impl_.ime_language_tag_, rhs_arena
845 );
846 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
847 PROTOBUF_FIELD_OFFSET(KeyboardLayoutConfig, _impl_.ime_layout_type_)
848 + sizeof(KeyboardLayoutConfig::_impl_.ime_layout_type_) // NOLINT
849 - PROTOBUF_FIELD_OFFSET(KeyboardLayoutConfig, _impl_.keyboard_layout_type_)>(
850 reinterpret_cast<char*>(&_impl_.keyboard_layout_type_),
851 reinterpret_cast<char*>(&other->_impl_.keyboard_layout_type_));
852 }
853
GetMetadata() const854 ::PROTOBUF_NAMESPACE_ID::Metadata KeyboardLayoutConfig::GetMetadata() const {
855 return ::_pbi::AssignDescriptors(
856 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
857 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[0]);
858 }
859
860 // ===================================================================
861
862 class RepeatedKeyboardLayoutConfig::_Internal {
863 public:
864 };
865
RepeatedKeyboardLayoutConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)866 RepeatedKeyboardLayoutConfig::RepeatedKeyboardLayoutConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
867 bool is_message_owned)
868 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
869 SharedCtor(arena, is_message_owned);
870 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
871 }
RepeatedKeyboardLayoutConfig(const RepeatedKeyboardLayoutConfig & from)872 RepeatedKeyboardLayoutConfig::RepeatedKeyboardLayoutConfig(const RepeatedKeyboardLayoutConfig& from)
873 : ::PROTOBUF_NAMESPACE_ID::Message() {
874 RepeatedKeyboardLayoutConfig* const _this = this; (void)_this;
875 new (&_impl_) Impl_{
876 decltype(_impl_.keyboard_layout_config_){from._impl_.keyboard_layout_config_}
877 , /*decltype(_impl_._cached_size_)*/{}};
878
879 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
880 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
881 }
882
SharedCtor(::_pb::Arena * arena,bool is_message_owned)883 inline void RepeatedKeyboardLayoutConfig::SharedCtor(
884 ::_pb::Arena* arena, bool is_message_owned) {
885 (void)arena;
886 (void)is_message_owned;
887 new (&_impl_) Impl_{
888 decltype(_impl_.keyboard_layout_config_){arena}
889 , /*decltype(_impl_._cached_size_)*/{}
890 };
891 }
892
~RepeatedKeyboardLayoutConfig()893 RepeatedKeyboardLayoutConfig::~RepeatedKeyboardLayoutConfig() {
894 // @@protoc_insertion_point(destructor:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
895 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
896 (void)arena;
897 return;
898 }
899 SharedDtor();
900 }
901
SharedDtor()902 inline void RepeatedKeyboardLayoutConfig::SharedDtor() {
903 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
904 _impl_.keyboard_layout_config_.~RepeatedPtrField();
905 }
906
SetCachedSize(int size) const907 void RepeatedKeyboardLayoutConfig::SetCachedSize(int size) const {
908 _impl_._cached_size_.Set(size);
909 }
910
Clear()911 void RepeatedKeyboardLayoutConfig::Clear() {
912 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
913 ::uint32_t cached_has_bits = 0;
914 // Prevent compiler warnings about cached_has_bits being unused
915 (void) cached_has_bits;
916
917 _impl_.keyboard_layout_config_.Clear();
918 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
919 }
920
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)921 const char* RepeatedKeyboardLayoutConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
922 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
923 while (!ctx->Done(&ptr)) {
924 ::uint32_t tag;
925 ptr = ::_pbi::ReadTag(ptr, &tag);
926 switch (tag >> 3) {
927 // repeated .android.os.statsd.input.KeyboardLayoutConfig keyboard_layout_config = 1;
928 case 1:
929 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
930 ptr -= 1;
931 do {
932 ptr += 1;
933 ptr = ctx->ParseMessage(_internal_add_keyboard_layout_config(), ptr);
934 CHK_(ptr);
935 if (!ctx->DataAvailable(ptr)) break;
936 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
937 } else {
938 goto handle_unusual;
939 }
940 continue;
941 default:
942 goto handle_unusual;
943 } // switch
944 handle_unusual:
945 if ((tag == 0) || ((tag & 7) == 4)) {
946 CHK_(ptr);
947 ctx->SetLastTag(tag);
948 goto message_done;
949 }
950 ptr = UnknownFieldParse(
951 tag,
952 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
953 ptr, ctx);
954 CHK_(ptr != nullptr);
955 } // while
956 message_done:
957 return ptr;
958 failure:
959 ptr = nullptr;
960 goto message_done;
961 #undef CHK_
962 }
963
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const964 ::uint8_t* RepeatedKeyboardLayoutConfig::_InternalSerialize(
965 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
966 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
967 ::uint32_t cached_has_bits = 0;
968 (void) cached_has_bits;
969
970 // repeated .android.os.statsd.input.KeyboardLayoutConfig keyboard_layout_config = 1;
971 for (unsigned i = 0,
972 n = static_cast<unsigned>(this->_internal_keyboard_layout_config_size()); i < n; i++) {
973 const auto& repfield = this->_internal_keyboard_layout_config(i);
974 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
975 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
976 }
977
978 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
979 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
980 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
981 }
982 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
983 return target;
984 }
985
ByteSizeLong() const986 size_t RepeatedKeyboardLayoutConfig::ByteSizeLong() const {
987 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
988 size_t total_size = 0;
989
990 ::uint32_t cached_has_bits = 0;
991 // Prevent compiler warnings about cached_has_bits being unused
992 (void) cached_has_bits;
993
994 // repeated .android.os.statsd.input.KeyboardLayoutConfig keyboard_layout_config = 1;
995 total_size += 1UL * this->_internal_keyboard_layout_config_size();
996 for (const auto& msg : this->_impl_.keyboard_layout_config_) {
997 total_size +=
998 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
999 }
1000
1001 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
1002 }
1003
1004 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RepeatedKeyboardLayoutConfig::_class_data_ = {
1005 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
1006 RepeatedKeyboardLayoutConfig::MergeImpl
1007 };
GetClassData() const1008 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RepeatedKeyboardLayoutConfig::GetClassData() const { return &_class_data_; }
1009
1010
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)1011 void RepeatedKeyboardLayoutConfig::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
1012 auto* const _this = static_cast<RepeatedKeyboardLayoutConfig*>(&to_msg);
1013 auto& from = static_cast<const RepeatedKeyboardLayoutConfig&>(from_msg);
1014 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
1015 GOOGLE_DCHECK_NE(&from, _this);
1016 ::uint32_t cached_has_bits = 0;
1017 (void) cached_has_bits;
1018
1019 _this->_impl_.keyboard_layout_config_.MergeFrom(from._impl_.keyboard_layout_config_);
1020 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1021 }
1022
CopyFrom(const RepeatedKeyboardLayoutConfig & from)1023 void RepeatedKeyboardLayoutConfig::CopyFrom(const RepeatedKeyboardLayoutConfig& from) {
1024 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.RepeatedKeyboardLayoutConfig)
1025 if (&from == this) return;
1026 Clear();
1027 MergeFrom(from);
1028 }
1029
IsInitialized() const1030 bool RepeatedKeyboardLayoutConfig::IsInitialized() const {
1031 return true;
1032 }
1033
InternalSwap(RepeatedKeyboardLayoutConfig * other)1034 void RepeatedKeyboardLayoutConfig::InternalSwap(RepeatedKeyboardLayoutConfig* other) {
1035 using std::swap;
1036 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1037 _impl_.keyboard_layout_config_.InternalSwap(&other->_impl_.keyboard_layout_config_);
1038 }
1039
GetMetadata() const1040 ::PROTOBUF_NAMESPACE_ID::Metadata RepeatedKeyboardLayoutConfig::GetMetadata() const {
1041 return ::_pbi::AssignDescriptors(
1042 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
1043 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[1]);
1044 }
1045
1046 // ===================================================================
1047
1048 class KeyboardConfigured::_Internal {
1049 public:
1050 using HasBits = decltype(std::declval<KeyboardConfigured>()._impl_._has_bits_);
set_has_is_first_time_configuration(HasBits * has_bits)1051 static void set_has_is_first_time_configuration(HasBits* has_bits) {
1052 (*has_bits)[0] |= 2u;
1053 }
set_has_vendor_id(HasBits * has_bits)1054 static void set_has_vendor_id(HasBits* has_bits) {
1055 (*has_bits)[0] |= 4u;
1056 }
set_has_product_id(HasBits * has_bits)1057 static void set_has_product_id(HasBits* has_bits) {
1058 (*has_bits)[0] |= 8u;
1059 }
1060 static const ::android::os::statsd::input::RepeatedKeyboardLayoutConfig& repeated_keyboard_layout_config(const KeyboardConfigured* msg);
set_has_repeated_keyboard_layout_config(HasBits * has_bits)1061 static void set_has_repeated_keyboard_layout_config(HasBits* has_bits) {
1062 (*has_bits)[0] |= 1u;
1063 }
set_has_device_bus(HasBits * has_bits)1064 static void set_has_device_bus(HasBits* has_bits) {
1065 (*has_bits)[0] |= 16u;
1066 }
1067 };
1068
1069 const ::android::os::statsd::input::RepeatedKeyboardLayoutConfig&
repeated_keyboard_layout_config(const KeyboardConfigured * msg)1070 KeyboardConfigured::_Internal::repeated_keyboard_layout_config(const KeyboardConfigured* msg) {
1071 return *msg->_impl_.repeated_keyboard_layout_config_;
1072 }
KeyboardConfigured(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1073 KeyboardConfigured::KeyboardConfigured(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1074 bool is_message_owned)
1075 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
1076 SharedCtor(arena, is_message_owned);
1077 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.KeyboardConfigured)
1078 }
KeyboardConfigured(const KeyboardConfigured & from)1079 KeyboardConfigured::KeyboardConfigured(const KeyboardConfigured& from)
1080 : ::PROTOBUF_NAMESPACE_ID::Message() {
1081 KeyboardConfigured* const _this = this; (void)_this;
1082 new (&_impl_) Impl_{
1083 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1084 , /*decltype(_impl_._cached_size_)*/{}
1085 , decltype(_impl_.repeated_keyboard_layout_config_){nullptr}
1086 , decltype(_impl_.is_first_time_configuration_){}
1087 , decltype(_impl_.vendor_id_){}
1088 , decltype(_impl_.product_id_){}
1089 , decltype(_impl_.device_bus_){}};
1090
1091 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1092 if (from._internal_has_repeated_keyboard_layout_config()) {
1093 _this->_impl_.repeated_keyboard_layout_config_ = new ::android::os::statsd::input::RepeatedKeyboardLayoutConfig(*from._impl_.repeated_keyboard_layout_config_);
1094 }
1095 ::memcpy(&_impl_.is_first_time_configuration_, &from._impl_.is_first_time_configuration_,
1096 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.device_bus_) -
1097 reinterpret_cast<char*>(&_impl_.is_first_time_configuration_)) + sizeof(_impl_.device_bus_));
1098 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.KeyboardConfigured)
1099 }
1100
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1101 inline void KeyboardConfigured::SharedCtor(
1102 ::_pb::Arena* arena, bool is_message_owned) {
1103 (void)arena;
1104 (void)is_message_owned;
1105 new (&_impl_) Impl_{
1106 decltype(_impl_._has_bits_){}
1107 , /*decltype(_impl_._cached_size_)*/{}
1108 , decltype(_impl_.repeated_keyboard_layout_config_){nullptr}
1109 , decltype(_impl_.is_first_time_configuration_){false}
1110 , decltype(_impl_.vendor_id_){0}
1111 , decltype(_impl_.product_id_){0}
1112 , decltype(_impl_.device_bus_){0}
1113 };
1114 }
1115
~KeyboardConfigured()1116 KeyboardConfigured::~KeyboardConfigured() {
1117 // @@protoc_insertion_point(destructor:android.os.statsd.input.KeyboardConfigured)
1118 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
1119 (void)arena;
1120 return;
1121 }
1122 SharedDtor();
1123 }
1124
SharedDtor()1125 inline void KeyboardConfigured::SharedDtor() {
1126 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1127 if (this != internal_default_instance()) delete _impl_.repeated_keyboard_layout_config_;
1128 }
1129
SetCachedSize(int size) const1130 void KeyboardConfigured::SetCachedSize(int size) const {
1131 _impl_._cached_size_.Set(size);
1132 }
1133
Clear()1134 void KeyboardConfigured::Clear() {
1135 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.KeyboardConfigured)
1136 ::uint32_t cached_has_bits = 0;
1137 // Prevent compiler warnings about cached_has_bits being unused
1138 (void) cached_has_bits;
1139
1140 cached_has_bits = _impl_._has_bits_[0];
1141 if (cached_has_bits & 0x00000001u) {
1142 GOOGLE_DCHECK(_impl_.repeated_keyboard_layout_config_ != nullptr);
1143 _impl_.repeated_keyboard_layout_config_->Clear();
1144 }
1145 if (cached_has_bits & 0x0000001eu) {
1146 ::memset(&_impl_.is_first_time_configuration_, 0, static_cast<size_t>(
1147 reinterpret_cast<char*>(&_impl_.device_bus_) -
1148 reinterpret_cast<char*>(&_impl_.is_first_time_configuration_)) + sizeof(_impl_.device_bus_));
1149 }
1150 _impl_._has_bits_.Clear();
1151 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1152 }
1153
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1154 const char* KeyboardConfigured::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1155 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1156 _Internal::HasBits has_bits{};
1157 while (!ctx->Done(&ptr)) {
1158 ::uint32_t tag;
1159 ptr = ::_pbi::ReadTag(ptr, &tag);
1160 switch (tag >> 3) {
1161 // optional bool is_first_time_configuration = 1;
1162 case 1:
1163 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1164 _Internal::set_has_is_first_time_configuration(&has_bits);
1165 _impl_.is_first_time_configuration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1166 CHK_(ptr);
1167 } else {
1168 goto handle_unusual;
1169 }
1170 continue;
1171 // optional int32 vendor_id = 2;
1172 case 2:
1173 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1174 _Internal::set_has_vendor_id(&has_bits);
1175 _impl_.vendor_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1176 CHK_(ptr);
1177 } else {
1178 goto handle_unusual;
1179 }
1180 continue;
1181 // optional int32 product_id = 3;
1182 case 3:
1183 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1184 _Internal::set_has_product_id(&has_bits);
1185 _impl_.product_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1186 CHK_(ptr);
1187 } else {
1188 goto handle_unusual;
1189 }
1190 continue;
1191 // optional .android.os.statsd.input.RepeatedKeyboardLayoutConfig repeated_keyboard_layout_config = 4 [(.android.os.statsd.log_mode) = MODE_BYTES];
1192 case 4:
1193 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1194 ptr = ctx->ParseMessage(_internal_mutable_repeated_keyboard_layout_config(), ptr);
1195 CHK_(ptr);
1196 } else {
1197 goto handle_unusual;
1198 }
1199 continue;
1200 // optional .android.input.InputDeviceBus device_bus = 5;
1201 case 5:
1202 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1203 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1204 CHK_(ptr);
1205 if (PROTOBUF_PREDICT_TRUE(::android::input::InputDeviceBus_IsValid(val))) {
1206 _internal_set_device_bus(static_cast<::android::input::InputDeviceBus>(val));
1207 } else {
1208 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
1209 }
1210 } else {
1211 goto handle_unusual;
1212 }
1213 continue;
1214 default:
1215 goto handle_unusual;
1216 } // switch
1217 handle_unusual:
1218 if ((tag == 0) || ((tag & 7) == 4)) {
1219 CHK_(ptr);
1220 ctx->SetLastTag(tag);
1221 goto message_done;
1222 }
1223 ptr = UnknownFieldParse(
1224 tag,
1225 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1226 ptr, ctx);
1227 CHK_(ptr != nullptr);
1228 } // while
1229 message_done:
1230 _impl_._has_bits_.Or(has_bits);
1231 return ptr;
1232 failure:
1233 ptr = nullptr;
1234 goto message_done;
1235 #undef CHK_
1236 }
1237
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1238 ::uint8_t* KeyboardConfigured::_InternalSerialize(
1239 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1240 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.KeyboardConfigured)
1241 ::uint32_t cached_has_bits = 0;
1242 (void) cached_has_bits;
1243
1244 cached_has_bits = _impl_._has_bits_[0];
1245 // optional bool is_first_time_configuration = 1;
1246 if (cached_has_bits & 0x00000002u) {
1247 target = stream->EnsureSpace(target);
1248 target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_is_first_time_configuration(), target);
1249 }
1250
1251 // optional int32 vendor_id = 2;
1252 if (cached_has_bits & 0x00000004u) {
1253 target = stream->EnsureSpace(target);
1254 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_vendor_id(), target);
1255 }
1256
1257 // optional int32 product_id = 3;
1258 if (cached_has_bits & 0x00000008u) {
1259 target = stream->EnsureSpace(target);
1260 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_product_id(), target);
1261 }
1262
1263 // optional .android.os.statsd.input.RepeatedKeyboardLayoutConfig repeated_keyboard_layout_config = 4 [(.android.os.statsd.log_mode) = MODE_BYTES];
1264 if (cached_has_bits & 0x00000001u) {
1265 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1266 InternalWriteMessage(4, _Internal::repeated_keyboard_layout_config(this),
1267 _Internal::repeated_keyboard_layout_config(this).GetCachedSize(), target, stream);
1268 }
1269
1270 // optional .android.input.InputDeviceBus device_bus = 5;
1271 if (cached_has_bits & 0x00000010u) {
1272 target = stream->EnsureSpace(target);
1273 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1274 5, this->_internal_device_bus(), target);
1275 }
1276
1277 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1278 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1279 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1280 }
1281 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.KeyboardConfigured)
1282 return target;
1283 }
1284
ByteSizeLong() const1285 size_t KeyboardConfigured::ByteSizeLong() const {
1286 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.KeyboardConfigured)
1287 size_t total_size = 0;
1288
1289 ::uint32_t cached_has_bits = 0;
1290 // Prevent compiler warnings about cached_has_bits being unused
1291 (void) cached_has_bits;
1292
1293 cached_has_bits = _impl_._has_bits_[0];
1294 if (cached_has_bits & 0x0000001fu) {
1295 // optional .android.os.statsd.input.RepeatedKeyboardLayoutConfig repeated_keyboard_layout_config = 4 [(.android.os.statsd.log_mode) = MODE_BYTES];
1296 if (cached_has_bits & 0x00000001u) {
1297 total_size += 1 +
1298 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1299 *_impl_.repeated_keyboard_layout_config_);
1300 }
1301
1302 // optional bool is_first_time_configuration = 1;
1303 if (cached_has_bits & 0x00000002u) {
1304 total_size += 1 + 1;
1305 }
1306
1307 // optional int32 vendor_id = 2;
1308 if (cached_has_bits & 0x00000004u) {
1309 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_vendor_id());
1310 }
1311
1312 // optional int32 product_id = 3;
1313 if (cached_has_bits & 0x00000008u) {
1314 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_product_id());
1315 }
1316
1317 // optional .android.input.InputDeviceBus device_bus = 5;
1318 if (cached_has_bits & 0x00000010u) {
1319 total_size += 1 +
1320 ::_pbi::WireFormatLite::EnumSize(this->_internal_device_bus());
1321 }
1322
1323 }
1324 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
1325 }
1326
1327 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyboardConfigured::_class_data_ = {
1328 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
1329 KeyboardConfigured::MergeImpl
1330 };
GetClassData() const1331 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyboardConfigured::GetClassData() const { return &_class_data_; }
1332
1333
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)1334 void KeyboardConfigured::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
1335 auto* const _this = static_cast<KeyboardConfigured*>(&to_msg);
1336 auto& from = static_cast<const KeyboardConfigured&>(from_msg);
1337 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.KeyboardConfigured)
1338 GOOGLE_DCHECK_NE(&from, _this);
1339 ::uint32_t cached_has_bits = 0;
1340 (void) cached_has_bits;
1341
1342 cached_has_bits = from._impl_._has_bits_[0];
1343 if (cached_has_bits & 0x0000001fu) {
1344 if (cached_has_bits & 0x00000001u) {
1345 _this->_internal_mutable_repeated_keyboard_layout_config()->::android::os::statsd::input::RepeatedKeyboardLayoutConfig::MergeFrom(
1346 from._internal_repeated_keyboard_layout_config());
1347 }
1348 if (cached_has_bits & 0x00000002u) {
1349 _this->_impl_.is_first_time_configuration_ = from._impl_.is_first_time_configuration_;
1350 }
1351 if (cached_has_bits & 0x00000004u) {
1352 _this->_impl_.vendor_id_ = from._impl_.vendor_id_;
1353 }
1354 if (cached_has_bits & 0x00000008u) {
1355 _this->_impl_.product_id_ = from._impl_.product_id_;
1356 }
1357 if (cached_has_bits & 0x00000010u) {
1358 _this->_impl_.device_bus_ = from._impl_.device_bus_;
1359 }
1360 _this->_impl_._has_bits_[0] |= cached_has_bits;
1361 }
1362 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1363 }
1364
CopyFrom(const KeyboardConfigured & from)1365 void KeyboardConfigured::CopyFrom(const KeyboardConfigured& from) {
1366 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.KeyboardConfigured)
1367 if (&from == this) return;
1368 Clear();
1369 MergeFrom(from);
1370 }
1371
IsInitialized() const1372 bool KeyboardConfigured::IsInitialized() const {
1373 return true;
1374 }
1375
InternalSwap(KeyboardConfigured * other)1376 void KeyboardConfigured::InternalSwap(KeyboardConfigured* other) {
1377 using std::swap;
1378 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1379 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1380 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1381 PROTOBUF_FIELD_OFFSET(KeyboardConfigured, _impl_.device_bus_)
1382 + sizeof(KeyboardConfigured::_impl_.device_bus_) // NOLINT
1383 - PROTOBUF_FIELD_OFFSET(KeyboardConfigured, _impl_.repeated_keyboard_layout_config_)>(
1384 reinterpret_cast<char*>(&_impl_.repeated_keyboard_layout_config_),
1385 reinterpret_cast<char*>(&other->_impl_.repeated_keyboard_layout_config_));
1386 }
1387
GetMetadata() const1388 ::PROTOBUF_NAMESPACE_ID::Metadata KeyboardConfigured::GetMetadata() const {
1389 return ::_pbi::AssignDescriptors(
1390 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
1391 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[2]);
1392 }
1393
1394 // ===================================================================
1395
1396 class KeyboardSystemsEventReported::_Internal {
1397 public:
1398 using HasBits = decltype(std::declval<KeyboardSystemsEventReported>()._impl_._has_bits_);
set_has_vendor_id(HasBits * has_bits)1399 static void set_has_vendor_id(HasBits* has_bits) {
1400 (*has_bits)[0] |= 1u;
1401 }
set_has_product_id(HasBits * has_bits)1402 static void set_has_product_id(HasBits* has_bits) {
1403 (*has_bits)[0] |= 2u;
1404 }
set_has_keyboard_system_event(HasBits * has_bits)1405 static void set_has_keyboard_system_event(HasBits* has_bits) {
1406 (*has_bits)[0] |= 4u;
1407 }
set_has_modifier_state(HasBits * has_bits)1408 static void set_has_modifier_state(HasBits* has_bits) {
1409 (*has_bits)[0] |= 8u;
1410 }
set_has_device_bus(HasBits * has_bits)1411 static void set_has_device_bus(HasBits* has_bits) {
1412 (*has_bits)[0] |= 16u;
1413 }
1414 };
1415
KeyboardSystemsEventReported(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1416 KeyboardSystemsEventReported::KeyboardSystemsEventReported(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1417 bool is_message_owned)
1418 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
1419 SharedCtor(arena, is_message_owned);
1420 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.KeyboardSystemsEventReported)
1421 }
KeyboardSystemsEventReported(const KeyboardSystemsEventReported & from)1422 KeyboardSystemsEventReported::KeyboardSystemsEventReported(const KeyboardSystemsEventReported& from)
1423 : ::PROTOBUF_NAMESPACE_ID::Message() {
1424 KeyboardSystemsEventReported* const _this = this; (void)_this;
1425 new (&_impl_) Impl_{
1426 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1427 , /*decltype(_impl_._cached_size_)*/{}
1428 , decltype(_impl_.key_code_){from._impl_.key_code_}
1429 , decltype(_impl_.vendor_id_){}
1430 , decltype(_impl_.product_id_){}
1431 , decltype(_impl_.keyboard_system_event_){}
1432 , decltype(_impl_.modifier_state_){}
1433 , decltype(_impl_.device_bus_){}};
1434
1435 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1436 ::memcpy(&_impl_.vendor_id_, &from._impl_.vendor_id_,
1437 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.device_bus_) -
1438 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.device_bus_));
1439 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.KeyboardSystemsEventReported)
1440 }
1441
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1442 inline void KeyboardSystemsEventReported::SharedCtor(
1443 ::_pb::Arena* arena, bool is_message_owned) {
1444 (void)arena;
1445 (void)is_message_owned;
1446 new (&_impl_) Impl_{
1447 decltype(_impl_._has_bits_){}
1448 , /*decltype(_impl_._cached_size_)*/{}
1449 , decltype(_impl_.key_code_){arena}
1450 , decltype(_impl_.vendor_id_){0}
1451 , decltype(_impl_.product_id_){0}
1452 , decltype(_impl_.keyboard_system_event_){0}
1453 , decltype(_impl_.modifier_state_){0}
1454 , decltype(_impl_.device_bus_){0}
1455 };
1456 }
1457
~KeyboardSystemsEventReported()1458 KeyboardSystemsEventReported::~KeyboardSystemsEventReported() {
1459 // @@protoc_insertion_point(destructor:android.os.statsd.input.KeyboardSystemsEventReported)
1460 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
1461 (void)arena;
1462 return;
1463 }
1464 SharedDtor();
1465 }
1466
SharedDtor()1467 inline void KeyboardSystemsEventReported::SharedDtor() {
1468 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1469 _impl_.key_code_.~RepeatedField();
1470 }
1471
SetCachedSize(int size) const1472 void KeyboardSystemsEventReported::SetCachedSize(int size) const {
1473 _impl_._cached_size_.Set(size);
1474 }
1475
Clear()1476 void KeyboardSystemsEventReported::Clear() {
1477 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.KeyboardSystemsEventReported)
1478 ::uint32_t cached_has_bits = 0;
1479 // Prevent compiler warnings about cached_has_bits being unused
1480 (void) cached_has_bits;
1481
1482 _impl_.key_code_.Clear();
1483 cached_has_bits = _impl_._has_bits_[0];
1484 if (cached_has_bits & 0x0000001fu) {
1485 ::memset(&_impl_.vendor_id_, 0, static_cast<size_t>(
1486 reinterpret_cast<char*>(&_impl_.device_bus_) -
1487 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.device_bus_));
1488 }
1489 _impl_._has_bits_.Clear();
1490 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1491 }
1492
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1493 const char* KeyboardSystemsEventReported::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1494 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1495 _Internal::HasBits has_bits{};
1496 while (!ctx->Done(&ptr)) {
1497 ::uint32_t tag;
1498 ptr = ::_pbi::ReadTag(ptr, &tag);
1499 switch (tag >> 3) {
1500 // optional int32 vendor_id = 1;
1501 case 1:
1502 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1503 _Internal::set_has_vendor_id(&has_bits);
1504 _impl_.vendor_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1505 CHK_(ptr);
1506 } else {
1507 goto handle_unusual;
1508 }
1509 continue;
1510 // optional int32 product_id = 2;
1511 case 2:
1512 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1513 _Internal::set_has_product_id(&has_bits);
1514 _impl_.product_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1515 CHK_(ptr);
1516 } else {
1517 goto handle_unusual;
1518 }
1519 continue;
1520 // optional .android.input.KeyboardSystemEvent keyboard_system_event = 3;
1521 case 3:
1522 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1523 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1524 CHK_(ptr);
1525 if (PROTOBUF_PREDICT_TRUE(::android::input::KeyboardSystemEvent_IsValid(val))) {
1526 _internal_set_keyboard_system_event(static_cast<::android::input::KeyboardSystemEvent>(val));
1527 } else {
1528 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
1529 }
1530 } else {
1531 goto handle_unusual;
1532 }
1533 continue;
1534 // repeated int32 key_code = 4;
1535 case 4:
1536 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1537 ptr -= 1;
1538 do {
1539 ptr += 1;
1540 _internal_add_key_code(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
1541 CHK_(ptr);
1542 if (!ctx->DataAvailable(ptr)) break;
1543 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
1544 } else if (static_cast<::uint8_t>(tag) == 34) {
1545 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_key_code(), ptr, ctx);
1546 CHK_(ptr);
1547 } else {
1548 goto handle_unusual;
1549 }
1550 continue;
1551 // optional int32 modifier_state = 5;
1552 case 5:
1553 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1554 _Internal::set_has_modifier_state(&has_bits);
1555 _impl_.modifier_state_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1556 CHK_(ptr);
1557 } else {
1558 goto handle_unusual;
1559 }
1560 continue;
1561 // optional .android.input.InputDeviceBus device_bus = 6;
1562 case 6:
1563 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1564 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1565 CHK_(ptr);
1566 if (PROTOBUF_PREDICT_TRUE(::android::input::InputDeviceBus_IsValid(val))) {
1567 _internal_set_device_bus(static_cast<::android::input::InputDeviceBus>(val));
1568 } else {
1569 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
1570 }
1571 } else {
1572 goto handle_unusual;
1573 }
1574 continue;
1575 default:
1576 goto handle_unusual;
1577 } // switch
1578 handle_unusual:
1579 if ((tag == 0) || ((tag & 7) == 4)) {
1580 CHK_(ptr);
1581 ctx->SetLastTag(tag);
1582 goto message_done;
1583 }
1584 ptr = UnknownFieldParse(
1585 tag,
1586 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1587 ptr, ctx);
1588 CHK_(ptr != nullptr);
1589 } // while
1590 message_done:
1591 _impl_._has_bits_.Or(has_bits);
1592 return ptr;
1593 failure:
1594 ptr = nullptr;
1595 goto message_done;
1596 #undef CHK_
1597 }
1598
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1599 ::uint8_t* KeyboardSystemsEventReported::_InternalSerialize(
1600 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1601 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.KeyboardSystemsEventReported)
1602 ::uint32_t cached_has_bits = 0;
1603 (void) cached_has_bits;
1604
1605 cached_has_bits = _impl_._has_bits_[0];
1606 // optional int32 vendor_id = 1;
1607 if (cached_has_bits & 0x00000001u) {
1608 target = stream->EnsureSpace(target);
1609 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_vendor_id(), target);
1610 }
1611
1612 // optional int32 product_id = 2;
1613 if (cached_has_bits & 0x00000002u) {
1614 target = stream->EnsureSpace(target);
1615 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_product_id(), target);
1616 }
1617
1618 // optional .android.input.KeyboardSystemEvent keyboard_system_event = 3;
1619 if (cached_has_bits & 0x00000004u) {
1620 target = stream->EnsureSpace(target);
1621 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1622 3, this->_internal_keyboard_system_event(), target);
1623 }
1624
1625 // repeated int32 key_code = 4;
1626 for (int i = 0, n = this->_internal_key_code_size(); i < n; i++) {
1627 target = stream->EnsureSpace(target);
1628 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_key_code(i), target);
1629 }
1630
1631 // optional int32 modifier_state = 5;
1632 if (cached_has_bits & 0x00000008u) {
1633 target = stream->EnsureSpace(target);
1634 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_modifier_state(), target);
1635 }
1636
1637 // optional .android.input.InputDeviceBus device_bus = 6;
1638 if (cached_has_bits & 0x00000010u) {
1639 target = stream->EnsureSpace(target);
1640 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1641 6, this->_internal_device_bus(), target);
1642 }
1643
1644 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1645 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1646 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1647 }
1648 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.KeyboardSystemsEventReported)
1649 return target;
1650 }
1651
ByteSizeLong() const1652 size_t KeyboardSystemsEventReported::ByteSizeLong() const {
1653 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.KeyboardSystemsEventReported)
1654 size_t total_size = 0;
1655
1656 ::uint32_t cached_has_bits = 0;
1657 // Prevent compiler warnings about cached_has_bits being unused
1658 (void) cached_has_bits;
1659
1660 // repeated int32 key_code = 4;
1661 {
1662 size_t data_size = ::_pbi::WireFormatLite::
1663 Int32Size(this->_impl_.key_code_);
1664 total_size += 1 *
1665 ::_pbi::FromIntSize(this->_internal_key_code_size());
1666 total_size += data_size;
1667 }
1668
1669 cached_has_bits = _impl_._has_bits_[0];
1670 if (cached_has_bits & 0x0000001fu) {
1671 // optional int32 vendor_id = 1;
1672 if (cached_has_bits & 0x00000001u) {
1673 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_vendor_id());
1674 }
1675
1676 // optional int32 product_id = 2;
1677 if (cached_has_bits & 0x00000002u) {
1678 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_product_id());
1679 }
1680
1681 // optional .android.input.KeyboardSystemEvent keyboard_system_event = 3;
1682 if (cached_has_bits & 0x00000004u) {
1683 total_size += 1 +
1684 ::_pbi::WireFormatLite::EnumSize(this->_internal_keyboard_system_event());
1685 }
1686
1687 // optional int32 modifier_state = 5;
1688 if (cached_has_bits & 0x00000008u) {
1689 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_modifier_state());
1690 }
1691
1692 // optional .android.input.InputDeviceBus device_bus = 6;
1693 if (cached_has_bits & 0x00000010u) {
1694 total_size += 1 +
1695 ::_pbi::WireFormatLite::EnumSize(this->_internal_device_bus());
1696 }
1697
1698 }
1699 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
1700 }
1701
1702 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyboardSystemsEventReported::_class_data_ = {
1703 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
1704 KeyboardSystemsEventReported::MergeImpl
1705 };
GetClassData() const1706 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyboardSystemsEventReported::GetClassData() const { return &_class_data_; }
1707
1708
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)1709 void KeyboardSystemsEventReported::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
1710 auto* const _this = static_cast<KeyboardSystemsEventReported*>(&to_msg);
1711 auto& from = static_cast<const KeyboardSystemsEventReported&>(from_msg);
1712 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.KeyboardSystemsEventReported)
1713 GOOGLE_DCHECK_NE(&from, _this);
1714 ::uint32_t cached_has_bits = 0;
1715 (void) cached_has_bits;
1716
1717 _this->_impl_.key_code_.MergeFrom(from._impl_.key_code_);
1718 cached_has_bits = from._impl_._has_bits_[0];
1719 if (cached_has_bits & 0x0000001fu) {
1720 if (cached_has_bits & 0x00000001u) {
1721 _this->_impl_.vendor_id_ = from._impl_.vendor_id_;
1722 }
1723 if (cached_has_bits & 0x00000002u) {
1724 _this->_impl_.product_id_ = from._impl_.product_id_;
1725 }
1726 if (cached_has_bits & 0x00000004u) {
1727 _this->_impl_.keyboard_system_event_ = from._impl_.keyboard_system_event_;
1728 }
1729 if (cached_has_bits & 0x00000008u) {
1730 _this->_impl_.modifier_state_ = from._impl_.modifier_state_;
1731 }
1732 if (cached_has_bits & 0x00000010u) {
1733 _this->_impl_.device_bus_ = from._impl_.device_bus_;
1734 }
1735 _this->_impl_._has_bits_[0] |= cached_has_bits;
1736 }
1737 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1738 }
1739
CopyFrom(const KeyboardSystemsEventReported & from)1740 void KeyboardSystemsEventReported::CopyFrom(const KeyboardSystemsEventReported& from) {
1741 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.KeyboardSystemsEventReported)
1742 if (&from == this) return;
1743 Clear();
1744 MergeFrom(from);
1745 }
1746
IsInitialized() const1747 bool KeyboardSystemsEventReported::IsInitialized() const {
1748 return true;
1749 }
1750
InternalSwap(KeyboardSystemsEventReported * other)1751 void KeyboardSystemsEventReported::InternalSwap(KeyboardSystemsEventReported* other) {
1752 using std::swap;
1753 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1754 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1755 _impl_.key_code_.InternalSwap(&other->_impl_.key_code_);
1756 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1757 PROTOBUF_FIELD_OFFSET(KeyboardSystemsEventReported, _impl_.device_bus_)
1758 + sizeof(KeyboardSystemsEventReported::_impl_.device_bus_) // NOLINT
1759 - PROTOBUF_FIELD_OFFSET(KeyboardSystemsEventReported, _impl_.vendor_id_)>(
1760 reinterpret_cast<char*>(&_impl_.vendor_id_),
1761 reinterpret_cast<char*>(&other->_impl_.vendor_id_));
1762 }
1763
GetMetadata() const1764 ::PROTOBUF_NAMESPACE_ID::Metadata KeyboardSystemsEventReported::GetMetadata() const {
1765 return ::_pbi::AssignDescriptors(
1766 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
1767 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[3]);
1768 }
1769
1770 // ===================================================================
1771
1772 class InputDeviceUsageReported::_Internal {
1773 public:
1774 using HasBits = decltype(std::declval<InputDeviceUsageReported>()._impl_._has_bits_);
set_has_vendor_id(HasBits * has_bits)1775 static void set_has_vendor_id(HasBits* has_bits) {
1776 (*has_bits)[0] |= 1u;
1777 }
set_has_product_id(HasBits * has_bits)1778 static void set_has_product_id(HasBits* has_bits) {
1779 (*has_bits)[0] |= 2u;
1780 }
set_has_version_id(HasBits * has_bits)1781 static void set_has_version_id(HasBits* has_bits) {
1782 (*has_bits)[0] |= 4u;
1783 }
set_has_device_bus(HasBits * has_bits)1784 static void set_has_device_bus(HasBits* has_bits) {
1785 (*has_bits)[0] |= 8u;
1786 }
set_has_usage_duration_millis(HasBits * has_bits)1787 static void set_has_usage_duration_millis(HasBits* has_bits) {
1788 (*has_bits)[0] |= 16u;
1789 }
1790 };
1791
InputDeviceUsageReported(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1792 InputDeviceUsageReported::InputDeviceUsageReported(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1793 bool is_message_owned)
1794 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
1795 SharedCtor(arena, is_message_owned);
1796 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.InputDeviceUsageReported)
1797 }
InputDeviceUsageReported(const InputDeviceUsageReported & from)1798 InputDeviceUsageReported::InputDeviceUsageReported(const InputDeviceUsageReported& from)
1799 : ::PROTOBUF_NAMESPACE_ID::Message() {
1800 InputDeviceUsageReported* const _this = this; (void)_this;
1801 new (&_impl_) Impl_{
1802 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1803 , /*decltype(_impl_._cached_size_)*/{}
1804 , decltype(_impl_.usage_sources_){from._impl_.usage_sources_}
1805 , decltype(_impl_.usage_durations_per_source_){from._impl_.usage_durations_per_source_}
1806 , decltype(_impl_.uids_){from._impl_.uids_}
1807 , decltype(_impl_.usage_durations_per_uid_){from._impl_.usage_durations_per_uid_}
1808 , decltype(_impl_.vendor_id_){}
1809 , decltype(_impl_.product_id_){}
1810 , decltype(_impl_.version_id_){}
1811 , decltype(_impl_.device_bus_){}
1812 , decltype(_impl_.usage_duration_millis_){}};
1813
1814 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1815 ::memcpy(&_impl_.vendor_id_, &from._impl_.vendor_id_,
1816 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.usage_duration_millis_) -
1817 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.usage_duration_millis_));
1818 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.InputDeviceUsageReported)
1819 }
1820
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1821 inline void InputDeviceUsageReported::SharedCtor(
1822 ::_pb::Arena* arena, bool is_message_owned) {
1823 (void)arena;
1824 (void)is_message_owned;
1825 new (&_impl_) Impl_{
1826 decltype(_impl_._has_bits_){}
1827 , /*decltype(_impl_._cached_size_)*/{}
1828 , decltype(_impl_.usage_sources_){arena}
1829 , decltype(_impl_.usage_durations_per_source_){arena}
1830 , decltype(_impl_.uids_){arena}
1831 , decltype(_impl_.usage_durations_per_uid_){arena}
1832 , decltype(_impl_.vendor_id_){0}
1833 , decltype(_impl_.product_id_){0}
1834 , decltype(_impl_.version_id_){0}
1835 , decltype(_impl_.device_bus_){0}
1836 , decltype(_impl_.usage_duration_millis_){0}
1837 };
1838 }
1839
~InputDeviceUsageReported()1840 InputDeviceUsageReported::~InputDeviceUsageReported() {
1841 // @@protoc_insertion_point(destructor:android.os.statsd.input.InputDeviceUsageReported)
1842 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
1843 (void)arena;
1844 return;
1845 }
1846 SharedDtor();
1847 }
1848
SharedDtor()1849 inline void InputDeviceUsageReported::SharedDtor() {
1850 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1851 _impl_.usage_sources_.~RepeatedField();
1852 _impl_.usage_durations_per_source_.~RepeatedField();
1853 _impl_.uids_.~RepeatedField();
1854 _impl_.usage_durations_per_uid_.~RepeatedField();
1855 }
1856
SetCachedSize(int size) const1857 void InputDeviceUsageReported::SetCachedSize(int size) const {
1858 _impl_._cached_size_.Set(size);
1859 }
1860
Clear()1861 void InputDeviceUsageReported::Clear() {
1862 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.InputDeviceUsageReported)
1863 ::uint32_t cached_has_bits = 0;
1864 // Prevent compiler warnings about cached_has_bits being unused
1865 (void) cached_has_bits;
1866
1867 _impl_.usage_sources_.Clear();
1868 _impl_.usage_durations_per_source_.Clear();
1869 _impl_.uids_.Clear();
1870 _impl_.usage_durations_per_uid_.Clear();
1871 cached_has_bits = _impl_._has_bits_[0];
1872 if (cached_has_bits & 0x0000001fu) {
1873 ::memset(&_impl_.vendor_id_, 0, static_cast<size_t>(
1874 reinterpret_cast<char*>(&_impl_.usage_duration_millis_) -
1875 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.usage_duration_millis_));
1876 }
1877 _impl_._has_bits_.Clear();
1878 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1879 }
1880
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1881 const char* InputDeviceUsageReported::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1882 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1883 _Internal::HasBits has_bits{};
1884 while (!ctx->Done(&ptr)) {
1885 ::uint32_t tag;
1886 ptr = ::_pbi::ReadTag(ptr, &tag);
1887 switch (tag >> 3) {
1888 // optional int32 vendor_id = 1;
1889 case 1:
1890 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1891 _Internal::set_has_vendor_id(&has_bits);
1892 _impl_.vendor_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1893 CHK_(ptr);
1894 } else {
1895 goto handle_unusual;
1896 }
1897 continue;
1898 // optional int32 product_id = 2;
1899 case 2:
1900 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1901 _Internal::set_has_product_id(&has_bits);
1902 _impl_.product_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1903 CHK_(ptr);
1904 } else {
1905 goto handle_unusual;
1906 }
1907 continue;
1908 // optional int32 version_id = 3;
1909 case 3:
1910 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1911 _Internal::set_has_version_id(&has_bits);
1912 _impl_.version_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1913 CHK_(ptr);
1914 } else {
1915 goto handle_unusual;
1916 }
1917 continue;
1918 // optional .android.input.InputDeviceBus device_bus = 4;
1919 case 4:
1920 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1921 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1922 CHK_(ptr);
1923 if (PROTOBUF_PREDICT_TRUE(::android::input::InputDeviceBus_IsValid(val))) {
1924 _internal_set_device_bus(static_cast<::android::input::InputDeviceBus>(val));
1925 } else {
1926 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
1927 }
1928 } else {
1929 goto handle_unusual;
1930 }
1931 continue;
1932 // optional int32 usage_duration_millis = 5;
1933 case 5:
1934 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1935 _Internal::set_has_usage_duration_millis(&has_bits);
1936 _impl_.usage_duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1937 CHK_(ptr);
1938 } else {
1939 goto handle_unusual;
1940 }
1941 continue;
1942 // repeated .android.input.InputDeviceUsageType usage_sources = 6;
1943 case 6:
1944 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1945 ptr -= 1;
1946 do {
1947 ptr += 1;
1948 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1949 CHK_(ptr);
1950 if (PROTOBUF_PREDICT_TRUE(::android::input::InputDeviceUsageType_IsValid(val))) {
1951 _internal_add_usage_sources(static_cast<::android::input::InputDeviceUsageType>(val));
1952 } else {
1953 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
1954 }
1955 if (!ctx->DataAvailable(ptr)) break;
1956 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<48>(ptr));
1957 } else if (static_cast<::uint8_t>(tag) == 50) {
1958 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_usage_sources(), ptr, ctx, ::android::input::InputDeviceUsageType_IsValid, &_internal_metadata_, 6);
1959 CHK_(ptr);
1960 } else {
1961 goto handle_unusual;
1962 }
1963 continue;
1964 // repeated int32 usage_durations_per_source = 7;
1965 case 7:
1966 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1967 ptr -= 1;
1968 do {
1969 ptr += 1;
1970 _internal_add_usage_durations_per_source(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
1971 CHK_(ptr);
1972 if (!ctx->DataAvailable(ptr)) break;
1973 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<56>(ptr));
1974 } else if (static_cast<::uint8_t>(tag) == 58) {
1975 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_usage_durations_per_source(), ptr, ctx);
1976 CHK_(ptr);
1977 } else {
1978 goto handle_unusual;
1979 }
1980 continue;
1981 // repeated int32 uids = 8 [(.android.os.statsd.is_uid) = true];
1982 case 8:
1983 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1984 ptr -= 1;
1985 do {
1986 ptr += 1;
1987 _internal_add_uids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
1988 CHK_(ptr);
1989 if (!ctx->DataAvailable(ptr)) break;
1990 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<64>(ptr));
1991 } else if (static_cast<::uint8_t>(tag) == 66) {
1992 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_uids(), ptr, ctx);
1993 CHK_(ptr);
1994 } else {
1995 goto handle_unusual;
1996 }
1997 continue;
1998 // repeated int32 usage_durations_per_uid = 9;
1999 case 9:
2000 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2001 ptr -= 1;
2002 do {
2003 ptr += 1;
2004 _internal_add_usage_durations_per_uid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
2005 CHK_(ptr);
2006 if (!ctx->DataAvailable(ptr)) break;
2007 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<72>(ptr));
2008 } else if (static_cast<::uint8_t>(tag) == 74) {
2009 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_usage_durations_per_uid(), ptr, ctx);
2010 CHK_(ptr);
2011 } else {
2012 goto handle_unusual;
2013 }
2014 continue;
2015 default:
2016 goto handle_unusual;
2017 } // switch
2018 handle_unusual:
2019 if ((tag == 0) || ((tag & 7) == 4)) {
2020 CHK_(ptr);
2021 ctx->SetLastTag(tag);
2022 goto message_done;
2023 }
2024 ptr = UnknownFieldParse(
2025 tag,
2026 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
2027 ptr, ctx);
2028 CHK_(ptr != nullptr);
2029 } // while
2030 message_done:
2031 _impl_._has_bits_.Or(has_bits);
2032 return ptr;
2033 failure:
2034 ptr = nullptr;
2035 goto message_done;
2036 #undef CHK_
2037 }
2038
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2039 ::uint8_t* InputDeviceUsageReported::_InternalSerialize(
2040 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2041 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.InputDeviceUsageReported)
2042 ::uint32_t cached_has_bits = 0;
2043 (void) cached_has_bits;
2044
2045 cached_has_bits = _impl_._has_bits_[0];
2046 // optional int32 vendor_id = 1;
2047 if (cached_has_bits & 0x00000001u) {
2048 target = stream->EnsureSpace(target);
2049 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_vendor_id(), target);
2050 }
2051
2052 // optional int32 product_id = 2;
2053 if (cached_has_bits & 0x00000002u) {
2054 target = stream->EnsureSpace(target);
2055 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_product_id(), target);
2056 }
2057
2058 // optional int32 version_id = 3;
2059 if (cached_has_bits & 0x00000004u) {
2060 target = stream->EnsureSpace(target);
2061 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_version_id(), target);
2062 }
2063
2064 // optional .android.input.InputDeviceBus device_bus = 4;
2065 if (cached_has_bits & 0x00000008u) {
2066 target = stream->EnsureSpace(target);
2067 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2068 4, this->_internal_device_bus(), target);
2069 }
2070
2071 // optional int32 usage_duration_millis = 5;
2072 if (cached_has_bits & 0x00000010u) {
2073 target = stream->EnsureSpace(target);
2074 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_usage_duration_millis(), target);
2075 }
2076
2077 // repeated .android.input.InputDeviceUsageType usage_sources = 6;
2078 for (int i = 0, n = this->_internal_usage_sources_size(); i < n; i++) {
2079 target = stream->EnsureSpace(target);
2080 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2081 6, this->_internal_usage_sources(i), target);
2082 }
2083
2084 // repeated int32 usage_durations_per_source = 7;
2085 for (int i = 0, n = this->_internal_usage_durations_per_source_size(); i < n; i++) {
2086 target = stream->EnsureSpace(target);
2087 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_usage_durations_per_source(i), target);
2088 }
2089
2090 // repeated int32 uids = 8 [(.android.os.statsd.is_uid) = true];
2091 for (int i = 0, n = this->_internal_uids_size(); i < n; i++) {
2092 target = stream->EnsureSpace(target);
2093 target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_uids(i), target);
2094 }
2095
2096 // repeated int32 usage_durations_per_uid = 9;
2097 for (int i = 0, n = this->_internal_usage_durations_per_uid_size(); i < n; i++) {
2098 target = stream->EnsureSpace(target);
2099 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_usage_durations_per_uid(i), target);
2100 }
2101
2102 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2103 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
2104 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
2105 }
2106 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.InputDeviceUsageReported)
2107 return target;
2108 }
2109
ByteSizeLong() const2110 size_t InputDeviceUsageReported::ByteSizeLong() const {
2111 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.InputDeviceUsageReported)
2112 size_t total_size = 0;
2113
2114 ::uint32_t cached_has_bits = 0;
2115 // Prevent compiler warnings about cached_has_bits being unused
2116 (void) cached_has_bits;
2117
2118 // repeated .android.input.InputDeviceUsageType usage_sources = 6;
2119 {
2120 size_t data_size = 0;
2121 unsigned int count = static_cast<unsigned int>(this->_internal_usage_sources_size());for (unsigned int i = 0; i < count; i++) {
2122 data_size += ::_pbi::WireFormatLite::EnumSize(
2123 this->_internal_usage_sources(static_cast<int>(i)));
2124 }
2125 total_size += (1UL * count) + data_size;
2126 }
2127
2128 // repeated int32 usage_durations_per_source = 7;
2129 {
2130 size_t data_size = ::_pbi::WireFormatLite::
2131 Int32Size(this->_impl_.usage_durations_per_source_);
2132 total_size += 1 *
2133 ::_pbi::FromIntSize(this->_internal_usage_durations_per_source_size());
2134 total_size += data_size;
2135 }
2136
2137 // repeated int32 uids = 8 [(.android.os.statsd.is_uid) = true];
2138 {
2139 size_t data_size = ::_pbi::WireFormatLite::
2140 Int32Size(this->_impl_.uids_);
2141 total_size += 1 *
2142 ::_pbi::FromIntSize(this->_internal_uids_size());
2143 total_size += data_size;
2144 }
2145
2146 // repeated int32 usage_durations_per_uid = 9;
2147 {
2148 size_t data_size = ::_pbi::WireFormatLite::
2149 Int32Size(this->_impl_.usage_durations_per_uid_);
2150 total_size += 1 *
2151 ::_pbi::FromIntSize(this->_internal_usage_durations_per_uid_size());
2152 total_size += data_size;
2153 }
2154
2155 cached_has_bits = _impl_._has_bits_[0];
2156 if (cached_has_bits & 0x0000001fu) {
2157 // optional int32 vendor_id = 1;
2158 if (cached_has_bits & 0x00000001u) {
2159 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_vendor_id());
2160 }
2161
2162 // optional int32 product_id = 2;
2163 if (cached_has_bits & 0x00000002u) {
2164 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_product_id());
2165 }
2166
2167 // optional int32 version_id = 3;
2168 if (cached_has_bits & 0x00000004u) {
2169 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_version_id());
2170 }
2171
2172 // optional .android.input.InputDeviceBus device_bus = 4;
2173 if (cached_has_bits & 0x00000008u) {
2174 total_size += 1 +
2175 ::_pbi::WireFormatLite::EnumSize(this->_internal_device_bus());
2176 }
2177
2178 // optional int32 usage_duration_millis = 5;
2179 if (cached_has_bits & 0x00000010u) {
2180 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_usage_duration_millis());
2181 }
2182
2183 }
2184 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
2185 }
2186
2187 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InputDeviceUsageReported::_class_data_ = {
2188 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
2189 InputDeviceUsageReported::MergeImpl
2190 };
GetClassData() const2191 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InputDeviceUsageReported::GetClassData() const { return &_class_data_; }
2192
2193
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)2194 void InputDeviceUsageReported::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
2195 auto* const _this = static_cast<InputDeviceUsageReported*>(&to_msg);
2196 auto& from = static_cast<const InputDeviceUsageReported&>(from_msg);
2197 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.InputDeviceUsageReported)
2198 GOOGLE_DCHECK_NE(&from, _this);
2199 ::uint32_t cached_has_bits = 0;
2200 (void) cached_has_bits;
2201
2202 _this->_impl_.usage_sources_.MergeFrom(from._impl_.usage_sources_);
2203 _this->_impl_.usage_durations_per_source_.MergeFrom(from._impl_.usage_durations_per_source_);
2204 _this->_impl_.uids_.MergeFrom(from._impl_.uids_);
2205 _this->_impl_.usage_durations_per_uid_.MergeFrom(from._impl_.usage_durations_per_uid_);
2206 cached_has_bits = from._impl_._has_bits_[0];
2207 if (cached_has_bits & 0x0000001fu) {
2208 if (cached_has_bits & 0x00000001u) {
2209 _this->_impl_.vendor_id_ = from._impl_.vendor_id_;
2210 }
2211 if (cached_has_bits & 0x00000002u) {
2212 _this->_impl_.product_id_ = from._impl_.product_id_;
2213 }
2214 if (cached_has_bits & 0x00000004u) {
2215 _this->_impl_.version_id_ = from._impl_.version_id_;
2216 }
2217 if (cached_has_bits & 0x00000008u) {
2218 _this->_impl_.device_bus_ = from._impl_.device_bus_;
2219 }
2220 if (cached_has_bits & 0x00000010u) {
2221 _this->_impl_.usage_duration_millis_ = from._impl_.usage_duration_millis_;
2222 }
2223 _this->_impl_._has_bits_[0] |= cached_has_bits;
2224 }
2225 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
2226 }
2227
CopyFrom(const InputDeviceUsageReported & from)2228 void InputDeviceUsageReported::CopyFrom(const InputDeviceUsageReported& from) {
2229 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.InputDeviceUsageReported)
2230 if (&from == this) return;
2231 Clear();
2232 MergeFrom(from);
2233 }
2234
IsInitialized() const2235 bool InputDeviceUsageReported::IsInitialized() const {
2236 return true;
2237 }
2238
InternalSwap(InputDeviceUsageReported * other)2239 void InputDeviceUsageReported::InternalSwap(InputDeviceUsageReported* other) {
2240 using std::swap;
2241 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2242 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2243 _impl_.usage_sources_.InternalSwap(&other->_impl_.usage_sources_);
2244 _impl_.usage_durations_per_source_.InternalSwap(&other->_impl_.usage_durations_per_source_);
2245 _impl_.uids_.InternalSwap(&other->_impl_.uids_);
2246 _impl_.usage_durations_per_uid_.InternalSwap(&other->_impl_.usage_durations_per_uid_);
2247 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2248 PROTOBUF_FIELD_OFFSET(InputDeviceUsageReported, _impl_.usage_duration_millis_)
2249 + sizeof(InputDeviceUsageReported::_impl_.usage_duration_millis_) // NOLINT
2250 - PROTOBUF_FIELD_OFFSET(InputDeviceUsageReported, _impl_.vendor_id_)>(
2251 reinterpret_cast<char*>(&_impl_.vendor_id_),
2252 reinterpret_cast<char*>(&other->_impl_.vendor_id_));
2253 }
2254
GetMetadata() const2255 ::PROTOBUF_NAMESPACE_ID::Metadata InputDeviceUsageReported::GetMetadata() const {
2256 return ::_pbi::AssignDescriptors(
2257 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
2258 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[4]);
2259 }
2260
2261 // ===================================================================
2262
2263 class TouchpadUsage::_Internal {
2264 public:
2265 using HasBits = decltype(std::declval<TouchpadUsage>()._impl_._has_bits_);
set_has_vendor_id(HasBits * has_bits)2266 static void set_has_vendor_id(HasBits* has_bits) {
2267 (*has_bits)[0] |= 1u;
2268 }
set_has_product_id(HasBits * has_bits)2269 static void set_has_product_id(HasBits* has_bits) {
2270 (*has_bits)[0] |= 2u;
2271 }
set_has_version_id(HasBits * has_bits)2272 static void set_has_version_id(HasBits* has_bits) {
2273 (*has_bits)[0] |= 4u;
2274 }
set_has_device_bus(HasBits * has_bits)2275 static void set_has_device_bus(HasBits* has_bits) {
2276 (*has_bits)[0] |= 8u;
2277 }
set_has_finger_count(HasBits * has_bits)2278 static void set_has_finger_count(HasBits* has_bits) {
2279 (*has_bits)[0] |= 16u;
2280 }
set_has_palm_count(HasBits * has_bits)2281 static void set_has_palm_count(HasBits* has_bits) {
2282 (*has_bits)[0] |= 32u;
2283 }
set_has_two_finger_swipe_gesture_count(HasBits * has_bits)2284 static void set_has_two_finger_swipe_gesture_count(HasBits* has_bits) {
2285 (*has_bits)[0] |= 64u;
2286 }
set_has_three_finger_swipe_gesture_count(HasBits * has_bits)2287 static void set_has_three_finger_swipe_gesture_count(HasBits* has_bits) {
2288 (*has_bits)[0] |= 128u;
2289 }
set_has_four_finger_swipe_gesture_count(HasBits * has_bits)2290 static void set_has_four_finger_swipe_gesture_count(HasBits* has_bits) {
2291 (*has_bits)[0] |= 256u;
2292 }
set_has_pinch_gesture_count(HasBits * has_bits)2293 static void set_has_pinch_gesture_count(HasBits* has_bits) {
2294 (*has_bits)[0] |= 512u;
2295 }
2296 };
2297
TouchpadUsage(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2298 TouchpadUsage::TouchpadUsage(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2299 bool is_message_owned)
2300 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
2301 SharedCtor(arena, is_message_owned);
2302 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.TouchpadUsage)
2303 }
TouchpadUsage(const TouchpadUsage & from)2304 TouchpadUsage::TouchpadUsage(const TouchpadUsage& from)
2305 : ::PROTOBUF_NAMESPACE_ID::Message() {
2306 TouchpadUsage* const _this = this; (void)_this;
2307 new (&_impl_) Impl_{
2308 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2309 , /*decltype(_impl_._cached_size_)*/{}
2310 , decltype(_impl_.vendor_id_){}
2311 , decltype(_impl_.product_id_){}
2312 , decltype(_impl_.version_id_){}
2313 , decltype(_impl_.device_bus_){}
2314 , decltype(_impl_.finger_count_){}
2315 , decltype(_impl_.palm_count_){}
2316 , decltype(_impl_.two_finger_swipe_gesture_count_){}
2317 , decltype(_impl_.three_finger_swipe_gesture_count_){}
2318 , decltype(_impl_.four_finger_swipe_gesture_count_){}
2319 , decltype(_impl_.pinch_gesture_count_){}};
2320
2321 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
2322 ::memcpy(&_impl_.vendor_id_, &from._impl_.vendor_id_,
2323 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.pinch_gesture_count_) -
2324 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.pinch_gesture_count_));
2325 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.TouchpadUsage)
2326 }
2327
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2328 inline void TouchpadUsage::SharedCtor(
2329 ::_pb::Arena* arena, bool is_message_owned) {
2330 (void)arena;
2331 (void)is_message_owned;
2332 new (&_impl_) Impl_{
2333 decltype(_impl_._has_bits_){}
2334 , /*decltype(_impl_._cached_size_)*/{}
2335 , decltype(_impl_.vendor_id_){0}
2336 , decltype(_impl_.product_id_){0}
2337 , decltype(_impl_.version_id_){0}
2338 , decltype(_impl_.device_bus_){0}
2339 , decltype(_impl_.finger_count_){0}
2340 , decltype(_impl_.palm_count_){0}
2341 , decltype(_impl_.two_finger_swipe_gesture_count_){0}
2342 , decltype(_impl_.three_finger_swipe_gesture_count_){0}
2343 , decltype(_impl_.four_finger_swipe_gesture_count_){0}
2344 , decltype(_impl_.pinch_gesture_count_){0}
2345 };
2346 }
2347
~TouchpadUsage()2348 TouchpadUsage::~TouchpadUsage() {
2349 // @@protoc_insertion_point(destructor:android.os.statsd.input.TouchpadUsage)
2350 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
2351 (void)arena;
2352 return;
2353 }
2354 SharedDtor();
2355 }
2356
SharedDtor()2357 inline void TouchpadUsage::SharedDtor() {
2358 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2359 }
2360
SetCachedSize(int size) const2361 void TouchpadUsage::SetCachedSize(int size) const {
2362 _impl_._cached_size_.Set(size);
2363 }
2364
Clear()2365 void TouchpadUsage::Clear() {
2366 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.TouchpadUsage)
2367 ::uint32_t cached_has_bits = 0;
2368 // Prevent compiler warnings about cached_has_bits being unused
2369 (void) cached_has_bits;
2370
2371 cached_has_bits = _impl_._has_bits_[0];
2372 if (cached_has_bits & 0x000000ffu) {
2373 ::memset(&_impl_.vendor_id_, 0, static_cast<size_t>(
2374 reinterpret_cast<char*>(&_impl_.three_finger_swipe_gesture_count_) -
2375 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.three_finger_swipe_gesture_count_));
2376 }
2377 if (cached_has_bits & 0x00000300u) {
2378 ::memset(&_impl_.four_finger_swipe_gesture_count_, 0, static_cast<size_t>(
2379 reinterpret_cast<char*>(&_impl_.pinch_gesture_count_) -
2380 reinterpret_cast<char*>(&_impl_.four_finger_swipe_gesture_count_)) + sizeof(_impl_.pinch_gesture_count_));
2381 }
2382 _impl_._has_bits_.Clear();
2383 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
2384 }
2385
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2386 const char* TouchpadUsage::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2387 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2388 _Internal::HasBits has_bits{};
2389 while (!ctx->Done(&ptr)) {
2390 ::uint32_t tag;
2391 ptr = ::_pbi::ReadTag(ptr, &tag);
2392 switch (tag >> 3) {
2393 // optional int32 vendor_id = 1;
2394 case 1:
2395 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2396 _Internal::set_has_vendor_id(&has_bits);
2397 _impl_.vendor_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2398 CHK_(ptr);
2399 } else {
2400 goto handle_unusual;
2401 }
2402 continue;
2403 // optional int32 product_id = 2;
2404 case 2:
2405 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2406 _Internal::set_has_product_id(&has_bits);
2407 _impl_.product_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2408 CHK_(ptr);
2409 } else {
2410 goto handle_unusual;
2411 }
2412 continue;
2413 // optional int32 version_id = 3;
2414 case 3:
2415 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2416 _Internal::set_has_version_id(&has_bits);
2417 _impl_.version_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2418 CHK_(ptr);
2419 } else {
2420 goto handle_unusual;
2421 }
2422 continue;
2423 // optional .android.input.InputDeviceBus device_bus = 4;
2424 case 4:
2425 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2426 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2427 CHK_(ptr);
2428 if (PROTOBUF_PREDICT_TRUE(::android::input::InputDeviceBus_IsValid(val))) {
2429 _internal_set_device_bus(static_cast<::android::input::InputDeviceBus>(val));
2430 } else {
2431 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
2432 }
2433 } else {
2434 goto handle_unusual;
2435 }
2436 continue;
2437 // optional int32 finger_count = 5;
2438 case 5:
2439 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2440 _Internal::set_has_finger_count(&has_bits);
2441 _impl_.finger_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2442 CHK_(ptr);
2443 } else {
2444 goto handle_unusual;
2445 }
2446 continue;
2447 // optional int32 palm_count = 6;
2448 case 6:
2449 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2450 _Internal::set_has_palm_count(&has_bits);
2451 _impl_.palm_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2452 CHK_(ptr);
2453 } else {
2454 goto handle_unusual;
2455 }
2456 continue;
2457 // optional int32 two_finger_swipe_gesture_count = 7;
2458 case 7:
2459 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2460 _Internal::set_has_two_finger_swipe_gesture_count(&has_bits);
2461 _impl_.two_finger_swipe_gesture_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2462 CHK_(ptr);
2463 } else {
2464 goto handle_unusual;
2465 }
2466 continue;
2467 // optional int32 three_finger_swipe_gesture_count = 8;
2468 case 8:
2469 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2470 _Internal::set_has_three_finger_swipe_gesture_count(&has_bits);
2471 _impl_.three_finger_swipe_gesture_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2472 CHK_(ptr);
2473 } else {
2474 goto handle_unusual;
2475 }
2476 continue;
2477 // optional int32 four_finger_swipe_gesture_count = 9;
2478 case 9:
2479 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2480 _Internal::set_has_four_finger_swipe_gesture_count(&has_bits);
2481 _impl_.four_finger_swipe_gesture_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2482 CHK_(ptr);
2483 } else {
2484 goto handle_unusual;
2485 }
2486 continue;
2487 // optional int32 pinch_gesture_count = 10;
2488 case 10:
2489 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2490 _Internal::set_has_pinch_gesture_count(&has_bits);
2491 _impl_.pinch_gesture_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2492 CHK_(ptr);
2493 } else {
2494 goto handle_unusual;
2495 }
2496 continue;
2497 default:
2498 goto handle_unusual;
2499 } // switch
2500 handle_unusual:
2501 if ((tag == 0) || ((tag & 7) == 4)) {
2502 CHK_(ptr);
2503 ctx->SetLastTag(tag);
2504 goto message_done;
2505 }
2506 ptr = UnknownFieldParse(
2507 tag,
2508 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
2509 ptr, ctx);
2510 CHK_(ptr != nullptr);
2511 } // while
2512 message_done:
2513 _impl_._has_bits_.Or(has_bits);
2514 return ptr;
2515 failure:
2516 ptr = nullptr;
2517 goto message_done;
2518 #undef CHK_
2519 }
2520
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2521 ::uint8_t* TouchpadUsage::_InternalSerialize(
2522 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2523 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.TouchpadUsage)
2524 ::uint32_t cached_has_bits = 0;
2525 (void) cached_has_bits;
2526
2527 cached_has_bits = _impl_._has_bits_[0];
2528 // optional int32 vendor_id = 1;
2529 if (cached_has_bits & 0x00000001u) {
2530 target = stream->EnsureSpace(target);
2531 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_vendor_id(), target);
2532 }
2533
2534 // optional int32 product_id = 2;
2535 if (cached_has_bits & 0x00000002u) {
2536 target = stream->EnsureSpace(target);
2537 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_product_id(), target);
2538 }
2539
2540 // optional int32 version_id = 3;
2541 if (cached_has_bits & 0x00000004u) {
2542 target = stream->EnsureSpace(target);
2543 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_version_id(), target);
2544 }
2545
2546 // optional .android.input.InputDeviceBus device_bus = 4;
2547 if (cached_has_bits & 0x00000008u) {
2548 target = stream->EnsureSpace(target);
2549 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2550 4, this->_internal_device_bus(), target);
2551 }
2552
2553 // optional int32 finger_count = 5;
2554 if (cached_has_bits & 0x00000010u) {
2555 target = stream->EnsureSpace(target);
2556 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_finger_count(), target);
2557 }
2558
2559 // optional int32 palm_count = 6;
2560 if (cached_has_bits & 0x00000020u) {
2561 target = stream->EnsureSpace(target);
2562 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_palm_count(), target);
2563 }
2564
2565 // optional int32 two_finger_swipe_gesture_count = 7;
2566 if (cached_has_bits & 0x00000040u) {
2567 target = stream->EnsureSpace(target);
2568 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_two_finger_swipe_gesture_count(), target);
2569 }
2570
2571 // optional int32 three_finger_swipe_gesture_count = 8;
2572 if (cached_has_bits & 0x00000080u) {
2573 target = stream->EnsureSpace(target);
2574 target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_three_finger_swipe_gesture_count(), target);
2575 }
2576
2577 // optional int32 four_finger_swipe_gesture_count = 9;
2578 if (cached_has_bits & 0x00000100u) {
2579 target = stream->EnsureSpace(target);
2580 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_four_finger_swipe_gesture_count(), target);
2581 }
2582
2583 // optional int32 pinch_gesture_count = 10;
2584 if (cached_has_bits & 0x00000200u) {
2585 target = stream->EnsureSpace(target);
2586 target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_pinch_gesture_count(), target);
2587 }
2588
2589 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2590 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
2591 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
2592 }
2593 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.TouchpadUsage)
2594 return target;
2595 }
2596
ByteSizeLong() const2597 size_t TouchpadUsage::ByteSizeLong() const {
2598 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.TouchpadUsage)
2599 size_t total_size = 0;
2600
2601 ::uint32_t cached_has_bits = 0;
2602 // Prevent compiler warnings about cached_has_bits being unused
2603 (void) cached_has_bits;
2604
2605 cached_has_bits = _impl_._has_bits_[0];
2606 if (cached_has_bits & 0x000000ffu) {
2607 // optional int32 vendor_id = 1;
2608 if (cached_has_bits & 0x00000001u) {
2609 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_vendor_id());
2610 }
2611
2612 // optional int32 product_id = 2;
2613 if (cached_has_bits & 0x00000002u) {
2614 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_product_id());
2615 }
2616
2617 // optional int32 version_id = 3;
2618 if (cached_has_bits & 0x00000004u) {
2619 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_version_id());
2620 }
2621
2622 // optional .android.input.InputDeviceBus device_bus = 4;
2623 if (cached_has_bits & 0x00000008u) {
2624 total_size += 1 +
2625 ::_pbi::WireFormatLite::EnumSize(this->_internal_device_bus());
2626 }
2627
2628 // optional int32 finger_count = 5;
2629 if (cached_has_bits & 0x00000010u) {
2630 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_finger_count());
2631 }
2632
2633 // optional int32 palm_count = 6;
2634 if (cached_has_bits & 0x00000020u) {
2635 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_palm_count());
2636 }
2637
2638 // optional int32 two_finger_swipe_gesture_count = 7;
2639 if (cached_has_bits & 0x00000040u) {
2640 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_two_finger_swipe_gesture_count());
2641 }
2642
2643 // optional int32 three_finger_swipe_gesture_count = 8;
2644 if (cached_has_bits & 0x00000080u) {
2645 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_three_finger_swipe_gesture_count());
2646 }
2647
2648 }
2649 if (cached_has_bits & 0x00000300u) {
2650 // optional int32 four_finger_swipe_gesture_count = 9;
2651 if (cached_has_bits & 0x00000100u) {
2652 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_four_finger_swipe_gesture_count());
2653 }
2654
2655 // optional int32 pinch_gesture_count = 10;
2656 if (cached_has_bits & 0x00000200u) {
2657 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pinch_gesture_count());
2658 }
2659
2660 }
2661 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
2662 }
2663
2664 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TouchpadUsage::_class_data_ = {
2665 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
2666 TouchpadUsage::MergeImpl
2667 };
GetClassData() const2668 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TouchpadUsage::GetClassData() const { return &_class_data_; }
2669
2670
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)2671 void TouchpadUsage::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
2672 auto* const _this = static_cast<TouchpadUsage*>(&to_msg);
2673 auto& from = static_cast<const TouchpadUsage&>(from_msg);
2674 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.TouchpadUsage)
2675 GOOGLE_DCHECK_NE(&from, _this);
2676 ::uint32_t cached_has_bits = 0;
2677 (void) cached_has_bits;
2678
2679 cached_has_bits = from._impl_._has_bits_[0];
2680 if (cached_has_bits & 0x000000ffu) {
2681 if (cached_has_bits & 0x00000001u) {
2682 _this->_impl_.vendor_id_ = from._impl_.vendor_id_;
2683 }
2684 if (cached_has_bits & 0x00000002u) {
2685 _this->_impl_.product_id_ = from._impl_.product_id_;
2686 }
2687 if (cached_has_bits & 0x00000004u) {
2688 _this->_impl_.version_id_ = from._impl_.version_id_;
2689 }
2690 if (cached_has_bits & 0x00000008u) {
2691 _this->_impl_.device_bus_ = from._impl_.device_bus_;
2692 }
2693 if (cached_has_bits & 0x00000010u) {
2694 _this->_impl_.finger_count_ = from._impl_.finger_count_;
2695 }
2696 if (cached_has_bits & 0x00000020u) {
2697 _this->_impl_.palm_count_ = from._impl_.palm_count_;
2698 }
2699 if (cached_has_bits & 0x00000040u) {
2700 _this->_impl_.two_finger_swipe_gesture_count_ = from._impl_.two_finger_swipe_gesture_count_;
2701 }
2702 if (cached_has_bits & 0x00000080u) {
2703 _this->_impl_.three_finger_swipe_gesture_count_ = from._impl_.three_finger_swipe_gesture_count_;
2704 }
2705 _this->_impl_._has_bits_[0] |= cached_has_bits;
2706 }
2707 if (cached_has_bits & 0x00000300u) {
2708 if (cached_has_bits & 0x00000100u) {
2709 _this->_impl_.four_finger_swipe_gesture_count_ = from._impl_.four_finger_swipe_gesture_count_;
2710 }
2711 if (cached_has_bits & 0x00000200u) {
2712 _this->_impl_.pinch_gesture_count_ = from._impl_.pinch_gesture_count_;
2713 }
2714 _this->_impl_._has_bits_[0] |= cached_has_bits;
2715 }
2716 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
2717 }
2718
CopyFrom(const TouchpadUsage & from)2719 void TouchpadUsage::CopyFrom(const TouchpadUsage& from) {
2720 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.TouchpadUsage)
2721 if (&from == this) return;
2722 Clear();
2723 MergeFrom(from);
2724 }
2725
IsInitialized() const2726 bool TouchpadUsage::IsInitialized() const {
2727 return true;
2728 }
2729
InternalSwap(TouchpadUsage * other)2730 void TouchpadUsage::InternalSwap(TouchpadUsage* other) {
2731 using std::swap;
2732 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2733 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2734 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2735 PROTOBUF_FIELD_OFFSET(TouchpadUsage, _impl_.pinch_gesture_count_)
2736 + sizeof(TouchpadUsage::_impl_.pinch_gesture_count_) // NOLINT
2737 - PROTOBUF_FIELD_OFFSET(TouchpadUsage, _impl_.vendor_id_)>(
2738 reinterpret_cast<char*>(&_impl_.vendor_id_),
2739 reinterpret_cast<char*>(&other->_impl_.vendor_id_));
2740 }
2741
GetMetadata() const2742 ::PROTOBUF_NAMESPACE_ID::Metadata TouchpadUsage::GetMetadata() const {
2743 return ::_pbi::AssignDescriptors(
2744 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
2745 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[5]);
2746 }
2747
2748 // ===================================================================
2749
2750 class InputEventLatencyReported::_Internal {
2751 public:
2752 using HasBits = decltype(std::declval<InputEventLatencyReported>()._impl_._has_bits_);
set_has_vendor_id(HasBits * has_bits)2753 static void set_has_vendor_id(HasBits* has_bits) {
2754 (*has_bits)[0] |= 1u;
2755 }
set_has_product_id(HasBits * has_bits)2756 static void set_has_product_id(HasBits* has_bits) {
2757 (*has_bits)[0] |= 2u;
2758 }
set_has_input_event_type(HasBits * has_bits)2759 static void set_has_input_event_type(HasBits* has_bits) {
2760 (*has_bits)[0] |= 4u;
2761 }
set_has_latency_stage(HasBits * has_bits)2762 static void set_has_latency_stage(HasBits* has_bits) {
2763 (*has_bits)[0] |= 8u;
2764 }
set_has_histogram_version(HasBits * has_bits)2765 static void set_has_histogram_version(HasBits* has_bits) {
2766 (*has_bits)[0] |= 16u;
2767 }
2768 };
2769
InputEventLatencyReported(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2770 InputEventLatencyReported::InputEventLatencyReported(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2771 bool is_message_owned)
2772 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
2773 SharedCtor(arena, is_message_owned);
2774 // @@protoc_insertion_point(arena_constructor:android.os.statsd.input.InputEventLatencyReported)
2775 }
InputEventLatencyReported(const InputEventLatencyReported & from)2776 InputEventLatencyReported::InputEventLatencyReported(const InputEventLatencyReported& from)
2777 : ::PROTOBUF_NAMESPACE_ID::Message() {
2778 InputEventLatencyReported* const _this = this; (void)_this;
2779 new (&_impl_) Impl_{
2780 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2781 , /*decltype(_impl_._cached_size_)*/{}
2782 , decltype(_impl_.sources_){from._impl_.sources_}
2783 , decltype(_impl_.histogram_counts_){from._impl_.histogram_counts_}
2784 , decltype(_impl_.vendor_id_){}
2785 , decltype(_impl_.product_id_){}
2786 , decltype(_impl_.input_event_type_){}
2787 , decltype(_impl_.latency_stage_){}
2788 , decltype(_impl_.histogram_version_){}};
2789
2790 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
2791 ::memcpy(&_impl_.vendor_id_, &from._impl_.vendor_id_,
2792 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.histogram_version_) -
2793 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.histogram_version_));
2794 // @@protoc_insertion_point(copy_constructor:android.os.statsd.input.InputEventLatencyReported)
2795 }
2796
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2797 inline void InputEventLatencyReported::SharedCtor(
2798 ::_pb::Arena* arena, bool is_message_owned) {
2799 (void)arena;
2800 (void)is_message_owned;
2801 new (&_impl_) Impl_{
2802 decltype(_impl_._has_bits_){}
2803 , /*decltype(_impl_._cached_size_)*/{}
2804 , decltype(_impl_.sources_){arena}
2805 , decltype(_impl_.histogram_counts_){arena}
2806 , decltype(_impl_.vendor_id_){0}
2807 , decltype(_impl_.product_id_){0}
2808 , decltype(_impl_.input_event_type_){0}
2809 , decltype(_impl_.latency_stage_){0}
2810 , decltype(_impl_.histogram_version_){0}
2811 };
2812 }
2813
~InputEventLatencyReported()2814 InputEventLatencyReported::~InputEventLatencyReported() {
2815 // @@protoc_insertion_point(destructor:android.os.statsd.input.InputEventLatencyReported)
2816 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
2817 (void)arena;
2818 return;
2819 }
2820 SharedDtor();
2821 }
2822
SharedDtor()2823 inline void InputEventLatencyReported::SharedDtor() {
2824 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2825 _impl_.sources_.~RepeatedField();
2826 _impl_.histogram_counts_.~RepeatedField();
2827 }
2828
SetCachedSize(int size) const2829 void InputEventLatencyReported::SetCachedSize(int size) const {
2830 _impl_._cached_size_.Set(size);
2831 }
2832
Clear()2833 void InputEventLatencyReported::Clear() {
2834 // @@protoc_insertion_point(message_clear_start:android.os.statsd.input.InputEventLatencyReported)
2835 ::uint32_t cached_has_bits = 0;
2836 // Prevent compiler warnings about cached_has_bits being unused
2837 (void) cached_has_bits;
2838
2839 _impl_.sources_.Clear();
2840 _impl_.histogram_counts_.Clear();
2841 cached_has_bits = _impl_._has_bits_[0];
2842 if (cached_has_bits & 0x0000001fu) {
2843 ::memset(&_impl_.vendor_id_, 0, static_cast<size_t>(
2844 reinterpret_cast<char*>(&_impl_.histogram_version_) -
2845 reinterpret_cast<char*>(&_impl_.vendor_id_)) + sizeof(_impl_.histogram_version_));
2846 }
2847 _impl_._has_bits_.Clear();
2848 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
2849 }
2850
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2851 const char* InputEventLatencyReported::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2852 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2853 _Internal::HasBits has_bits{};
2854 while (!ctx->Done(&ptr)) {
2855 ::uint32_t tag;
2856 ptr = ::_pbi::ReadTag(ptr, &tag);
2857 switch (tag >> 3) {
2858 // optional int32 vendor_id = 1;
2859 case 1:
2860 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2861 _Internal::set_has_vendor_id(&has_bits);
2862 _impl_.vendor_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2863 CHK_(ptr);
2864 } else {
2865 goto handle_unusual;
2866 }
2867 continue;
2868 // optional int32 product_id = 2;
2869 case 2:
2870 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2871 _Internal::set_has_product_id(&has_bits);
2872 _impl_.product_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2873 CHK_(ptr);
2874 } else {
2875 goto handle_unusual;
2876 }
2877 continue;
2878 // repeated .android.input.InputDeviceUsageType sources = 3;
2879 case 3:
2880 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2881 ptr -= 1;
2882 do {
2883 ptr += 1;
2884 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2885 CHK_(ptr);
2886 if (PROTOBUF_PREDICT_TRUE(::android::input::InputDeviceUsageType_IsValid(val))) {
2887 _internal_add_sources(static_cast<::android::input::InputDeviceUsageType>(val));
2888 } else {
2889 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
2890 }
2891 if (!ctx->DataAvailable(ptr)) break;
2892 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
2893 } else if (static_cast<::uint8_t>(tag) == 26) {
2894 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_sources(), ptr, ctx, ::android::input::InputDeviceUsageType_IsValid, &_internal_metadata_, 3);
2895 CHK_(ptr);
2896 } else {
2897 goto handle_unusual;
2898 }
2899 continue;
2900 // optional .android.input.InputEventType input_event_type = 4;
2901 case 4:
2902 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2903 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2904 CHK_(ptr);
2905 if (PROTOBUF_PREDICT_TRUE(::android::input::InputEventType_IsValid(val))) {
2906 _internal_set_input_event_type(static_cast<::android::input::InputEventType>(val));
2907 } else {
2908 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
2909 }
2910 } else {
2911 goto handle_unusual;
2912 }
2913 continue;
2914 // optional .android.input.LatencyStage latency_stage = 5;
2915 case 5:
2916 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2917 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2918 CHK_(ptr);
2919 if (PROTOBUF_PREDICT_TRUE(::android::input::LatencyStage_IsValid(val))) {
2920 _internal_set_latency_stage(static_cast<::android::input::LatencyStage>(val));
2921 } else {
2922 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
2923 }
2924 } else {
2925 goto handle_unusual;
2926 }
2927 continue;
2928 // optional int32 histogram_version = 6;
2929 case 6:
2930 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2931 _Internal::set_has_histogram_version(&has_bits);
2932 _impl_.histogram_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2933 CHK_(ptr);
2934 } else {
2935 goto handle_unusual;
2936 }
2937 continue;
2938 // repeated int32 histogram_counts = 7;
2939 case 7:
2940 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2941 ptr -= 1;
2942 do {
2943 ptr += 1;
2944 _internal_add_histogram_counts(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
2945 CHK_(ptr);
2946 if (!ctx->DataAvailable(ptr)) break;
2947 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<56>(ptr));
2948 } else if (static_cast<::uint8_t>(tag) == 58) {
2949 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_histogram_counts(), ptr, ctx);
2950 CHK_(ptr);
2951 } else {
2952 goto handle_unusual;
2953 }
2954 continue;
2955 default:
2956 goto handle_unusual;
2957 } // switch
2958 handle_unusual:
2959 if ((tag == 0) || ((tag & 7) == 4)) {
2960 CHK_(ptr);
2961 ctx->SetLastTag(tag);
2962 goto message_done;
2963 }
2964 ptr = UnknownFieldParse(
2965 tag,
2966 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
2967 ptr, ctx);
2968 CHK_(ptr != nullptr);
2969 } // while
2970 message_done:
2971 _impl_._has_bits_.Or(has_bits);
2972 return ptr;
2973 failure:
2974 ptr = nullptr;
2975 goto message_done;
2976 #undef CHK_
2977 }
2978
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2979 ::uint8_t* InputEventLatencyReported::_InternalSerialize(
2980 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2981 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.input.InputEventLatencyReported)
2982 ::uint32_t cached_has_bits = 0;
2983 (void) cached_has_bits;
2984
2985 cached_has_bits = _impl_._has_bits_[0];
2986 // optional int32 vendor_id = 1;
2987 if (cached_has_bits & 0x00000001u) {
2988 target = stream->EnsureSpace(target);
2989 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_vendor_id(), target);
2990 }
2991
2992 // optional int32 product_id = 2;
2993 if (cached_has_bits & 0x00000002u) {
2994 target = stream->EnsureSpace(target);
2995 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_product_id(), target);
2996 }
2997
2998 // repeated .android.input.InputDeviceUsageType sources = 3;
2999 for (int i = 0, n = this->_internal_sources_size(); i < n; i++) {
3000 target = stream->EnsureSpace(target);
3001 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3002 3, this->_internal_sources(i), target);
3003 }
3004
3005 // optional .android.input.InputEventType input_event_type = 4;
3006 if (cached_has_bits & 0x00000004u) {
3007 target = stream->EnsureSpace(target);
3008 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3009 4, this->_internal_input_event_type(), target);
3010 }
3011
3012 // optional .android.input.LatencyStage latency_stage = 5;
3013 if (cached_has_bits & 0x00000008u) {
3014 target = stream->EnsureSpace(target);
3015 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3016 5, this->_internal_latency_stage(), target);
3017 }
3018
3019 // optional int32 histogram_version = 6;
3020 if (cached_has_bits & 0x00000010u) {
3021 target = stream->EnsureSpace(target);
3022 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_histogram_version(), target);
3023 }
3024
3025 // repeated int32 histogram_counts = 7;
3026 for (int i = 0, n = this->_internal_histogram_counts_size(); i < n; i++) {
3027 target = stream->EnsureSpace(target);
3028 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_histogram_counts(i), target);
3029 }
3030
3031 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3032 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
3033 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
3034 }
3035 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.input.InputEventLatencyReported)
3036 return target;
3037 }
3038
ByteSizeLong() const3039 size_t InputEventLatencyReported::ByteSizeLong() const {
3040 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.input.InputEventLatencyReported)
3041 size_t total_size = 0;
3042
3043 ::uint32_t cached_has_bits = 0;
3044 // Prevent compiler warnings about cached_has_bits being unused
3045 (void) cached_has_bits;
3046
3047 // repeated .android.input.InputDeviceUsageType sources = 3;
3048 {
3049 size_t data_size = 0;
3050 unsigned int count = static_cast<unsigned int>(this->_internal_sources_size());for (unsigned int i = 0; i < count; i++) {
3051 data_size += ::_pbi::WireFormatLite::EnumSize(
3052 this->_internal_sources(static_cast<int>(i)));
3053 }
3054 total_size += (1UL * count) + data_size;
3055 }
3056
3057 // repeated int32 histogram_counts = 7;
3058 {
3059 size_t data_size = ::_pbi::WireFormatLite::
3060 Int32Size(this->_impl_.histogram_counts_);
3061 total_size += 1 *
3062 ::_pbi::FromIntSize(this->_internal_histogram_counts_size());
3063 total_size += data_size;
3064 }
3065
3066 cached_has_bits = _impl_._has_bits_[0];
3067 if (cached_has_bits & 0x0000001fu) {
3068 // optional int32 vendor_id = 1;
3069 if (cached_has_bits & 0x00000001u) {
3070 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_vendor_id());
3071 }
3072
3073 // optional int32 product_id = 2;
3074 if (cached_has_bits & 0x00000002u) {
3075 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_product_id());
3076 }
3077
3078 // optional .android.input.InputEventType input_event_type = 4;
3079 if (cached_has_bits & 0x00000004u) {
3080 total_size += 1 +
3081 ::_pbi::WireFormatLite::EnumSize(this->_internal_input_event_type());
3082 }
3083
3084 // optional .android.input.LatencyStage latency_stage = 5;
3085 if (cached_has_bits & 0x00000008u) {
3086 total_size += 1 +
3087 ::_pbi::WireFormatLite::EnumSize(this->_internal_latency_stage());
3088 }
3089
3090 // optional int32 histogram_version = 6;
3091 if (cached_has_bits & 0x00000010u) {
3092 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_histogram_version());
3093 }
3094
3095 }
3096 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
3097 }
3098
3099 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InputEventLatencyReported::_class_data_ = {
3100 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
3101 InputEventLatencyReported::MergeImpl
3102 };
GetClassData() const3103 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InputEventLatencyReported::GetClassData() const { return &_class_data_; }
3104
3105
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)3106 void InputEventLatencyReported::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
3107 auto* const _this = static_cast<InputEventLatencyReported*>(&to_msg);
3108 auto& from = static_cast<const InputEventLatencyReported&>(from_msg);
3109 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.input.InputEventLatencyReported)
3110 GOOGLE_DCHECK_NE(&from, _this);
3111 ::uint32_t cached_has_bits = 0;
3112 (void) cached_has_bits;
3113
3114 _this->_impl_.sources_.MergeFrom(from._impl_.sources_);
3115 _this->_impl_.histogram_counts_.MergeFrom(from._impl_.histogram_counts_);
3116 cached_has_bits = from._impl_._has_bits_[0];
3117 if (cached_has_bits & 0x0000001fu) {
3118 if (cached_has_bits & 0x00000001u) {
3119 _this->_impl_.vendor_id_ = from._impl_.vendor_id_;
3120 }
3121 if (cached_has_bits & 0x00000002u) {
3122 _this->_impl_.product_id_ = from._impl_.product_id_;
3123 }
3124 if (cached_has_bits & 0x00000004u) {
3125 _this->_impl_.input_event_type_ = from._impl_.input_event_type_;
3126 }
3127 if (cached_has_bits & 0x00000008u) {
3128 _this->_impl_.latency_stage_ = from._impl_.latency_stage_;
3129 }
3130 if (cached_has_bits & 0x00000010u) {
3131 _this->_impl_.histogram_version_ = from._impl_.histogram_version_;
3132 }
3133 _this->_impl_._has_bits_[0] |= cached_has_bits;
3134 }
3135 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
3136 }
3137
CopyFrom(const InputEventLatencyReported & from)3138 void InputEventLatencyReported::CopyFrom(const InputEventLatencyReported& from) {
3139 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.input.InputEventLatencyReported)
3140 if (&from == this) return;
3141 Clear();
3142 MergeFrom(from);
3143 }
3144
IsInitialized() const3145 bool InputEventLatencyReported::IsInitialized() const {
3146 return true;
3147 }
3148
InternalSwap(InputEventLatencyReported * other)3149 void InputEventLatencyReported::InternalSwap(InputEventLatencyReported* other) {
3150 using std::swap;
3151 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3152 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3153 _impl_.sources_.InternalSwap(&other->_impl_.sources_);
3154 _impl_.histogram_counts_.InternalSwap(&other->_impl_.histogram_counts_);
3155 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3156 PROTOBUF_FIELD_OFFSET(InputEventLatencyReported, _impl_.histogram_version_)
3157 + sizeof(InputEventLatencyReported::_impl_.histogram_version_) // NOLINT
3158 - PROTOBUF_FIELD_OFFSET(InputEventLatencyReported, _impl_.vendor_id_)>(
3159 reinterpret_cast<char*>(&_impl_.vendor_id_),
3160 reinterpret_cast<char*>(&other->_impl_.vendor_id_));
3161 }
3162
GetMetadata() const3163 ::PROTOBUF_NAMESPACE_ID::Metadata InputEventLatencyReported::GetMetadata() const {
3164 return ::_pbi::AssignDescriptors(
3165 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto_once,
3166 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2finput_2finput_5fextension_5fatoms_2eproto[6]);
3167 }
3168 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
3169 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::input::KeyboardConfigured >, 11, false>
3170 keyboard_configured(kKeyboardConfiguredFieldNumber, ::android::os::statsd::input::KeyboardConfigured::default_instance(), nullptr);
3171 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
3172 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::input::KeyboardSystemsEventReported >, 11, false>
3173 keyboard_systems_event_reported(kKeyboardSystemsEventReportedFieldNumber, ::android::os::statsd::input::KeyboardSystemsEventReported::default_instance(), nullptr);
3174 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
3175 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::input::InputDeviceUsageReported >, 11, false>
3176 inputdevice_usage_reported(kInputdeviceUsageReportedFieldNumber, ::android::os::statsd::input::InputDeviceUsageReported::default_instance(), nullptr);
3177 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
3178 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::input::InputEventLatencyReported >, 11, false>
3179 input_event_latency_reported(kInputEventLatencyReportedFieldNumber, ::android::os::statsd::input::InputEventLatencyReported::default_instance(), nullptr);
3180 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
3181 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::input::TouchpadUsage >, 11, false>
3182 touchpad_usage(kTouchpadUsageFieldNumber, ::android::os::statsd::input::TouchpadUsage::default_instance(), nullptr);
3183
3184 // @@protoc_insertion_point(namespace_scope)
3185 } // namespace input
3186 } // namespace statsd
3187 } // namespace os
3188 } // namespace android
3189 PROTOBUF_NAMESPACE_OPEN
3190 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::KeyboardLayoutConfig*
CreateMaybeMessage(Arena * arena)3191 Arena::CreateMaybeMessage< ::android::os::statsd::input::KeyboardLayoutConfig >(Arena* arena) {
3192 return Arena::CreateMessageInternal< ::android::os::statsd::input::KeyboardLayoutConfig >(arena);
3193 }
3194 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::RepeatedKeyboardLayoutConfig*
CreateMaybeMessage(Arena * arena)3195 Arena::CreateMaybeMessage< ::android::os::statsd::input::RepeatedKeyboardLayoutConfig >(Arena* arena) {
3196 return Arena::CreateMessageInternal< ::android::os::statsd::input::RepeatedKeyboardLayoutConfig >(arena);
3197 }
3198 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::KeyboardConfigured*
CreateMaybeMessage(Arena * arena)3199 Arena::CreateMaybeMessage< ::android::os::statsd::input::KeyboardConfigured >(Arena* arena) {
3200 return Arena::CreateMessageInternal< ::android::os::statsd::input::KeyboardConfigured >(arena);
3201 }
3202 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::KeyboardSystemsEventReported*
CreateMaybeMessage(Arena * arena)3203 Arena::CreateMaybeMessage< ::android::os::statsd::input::KeyboardSystemsEventReported >(Arena* arena) {
3204 return Arena::CreateMessageInternal< ::android::os::statsd::input::KeyboardSystemsEventReported >(arena);
3205 }
3206 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::InputDeviceUsageReported*
CreateMaybeMessage(Arena * arena)3207 Arena::CreateMaybeMessage< ::android::os::statsd::input::InputDeviceUsageReported >(Arena* arena) {
3208 return Arena::CreateMessageInternal< ::android::os::statsd::input::InputDeviceUsageReported >(arena);
3209 }
3210 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::TouchpadUsage*
CreateMaybeMessage(Arena * arena)3211 Arena::CreateMaybeMessage< ::android::os::statsd::input::TouchpadUsage >(Arena* arena) {
3212 return Arena::CreateMessageInternal< ::android::os::statsd::input::TouchpadUsage >(arena);
3213 }
3214 template<> PROTOBUF_NOINLINE ::android::os::statsd::input::InputEventLatencyReported*
CreateMaybeMessage(Arena * arena)3215 Arena::CreateMaybeMessage< ::android::os::statsd::input::InputEventLatencyReported >(Arena* arena) {
3216 return Arena::CreateMessageInternal< ::android::os::statsd::input::InputEventLatencyReported >(arena);
3217 }
3218 PROTOBUF_NAMESPACE_CLOSE
3219
3220 // @@protoc_insertion_point(global_scope)
3221 #include <google/protobuf/port_undef.inc>
3222