1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: packages/modules/StatsD/statsd/src/uid_data.proto
3 
4 #include "packages/modules/StatsD/statsd/src/uid_data.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/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace android {
22 namespace os {
23 namespace statsd {
ApplicationInfo(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR ApplicationInfo::ApplicationInfo(
25     ::_pbi::ConstantInitialized): _impl_{
26     /*decltype(_impl_._has_bits_)*/{}
27   , /*decltype(_impl_._cached_size_)*/{}
28   , /*decltype(_impl_.version_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29   , /*decltype(_impl_.package_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
30   , /*decltype(_impl_.installer_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
31   , /*decltype(_impl_.certificate_hash_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
32   , /*decltype(_impl_.version_)*/::int64_t{0}
33   , /*decltype(_impl_.uid_)*/0} {}
34 struct ApplicationInfoDefaultTypeInternal {
ApplicationInfoDefaultTypeInternalandroid::os::statsd::ApplicationInfoDefaultTypeInternal35   PROTOBUF_CONSTEXPR ApplicationInfoDefaultTypeInternal()
36       : _instance(::_pbi::ConstantInitialized{}) {}
~ApplicationInfoDefaultTypeInternalandroid::os::statsd::ApplicationInfoDefaultTypeInternal37   ~ApplicationInfoDefaultTypeInternal() {}
38   union {  // NOLINT(misc-non-private-member-variables-in-classes)
39     ApplicationInfo _instance;
40   };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApplicationInfoDefaultTypeInternal _ApplicationInfo_default_instance_;
UidData(::_pbi::ConstantInitialized)43 PROTOBUF_CONSTEXPR UidData::UidData(
44     ::_pbi::ConstantInitialized): _impl_{
45     /*decltype(_impl_.app_info_)*/{}
46   , /*decltype(_impl_._cached_size_)*/{}} {}
47 struct UidDataDefaultTypeInternal {
UidDataDefaultTypeInternalandroid::os::statsd::UidDataDefaultTypeInternal48   PROTOBUF_CONSTEXPR UidDataDefaultTypeInternal()
49       : _instance(::_pbi::ConstantInitialized{}) {}
~UidDataDefaultTypeInternalandroid::os::statsd::UidDataDefaultTypeInternal50   ~UidDataDefaultTypeInternal() {}
51   union {  // NOLINT(misc-non-private-member-variables-in-classes)
52     UidData _instance;
53   };
54 };
55 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UidDataDefaultTypeInternal _UidData_default_instance_;
56 }  // namespace statsd
57 }  // namespace os
58 }  // namespace android
59 namespace android {
60 namespace os {
61 namespace statsd {
62 
63 // ===================================================================
64 
65 class ApplicationInfo::_Internal {
66  public:
67   using HasBits = decltype(std::declval<ApplicationInfo>()._impl_._has_bits_);
set_has_uid(HasBits * has_bits)68   static void set_has_uid(HasBits* has_bits) {
69     (*has_bits)[0] |= 32u;
70   }
set_has_version(HasBits * has_bits)71   static void set_has_version(HasBits* has_bits) {
72     (*has_bits)[0] |= 16u;
73   }
set_has_version_string(HasBits * has_bits)74   static void set_has_version_string(HasBits* has_bits) {
75     (*has_bits)[0] |= 1u;
76   }
set_has_package_name(HasBits * has_bits)77   static void set_has_package_name(HasBits* has_bits) {
78     (*has_bits)[0] |= 2u;
79   }
set_has_installer(HasBits * has_bits)80   static void set_has_installer(HasBits* has_bits) {
81     (*has_bits)[0] |= 4u;
82   }
set_has_certificate_hash(HasBits * has_bits)83   static void set_has_certificate_hash(HasBits* has_bits) {
84     (*has_bits)[0] |= 8u;
85   }
86 };
87 
ApplicationInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)88 ApplicationInfo::ApplicationInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
89                          bool is_message_owned)
90   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
91   SharedCtor(arena, is_message_owned);
92   // @@protoc_insertion_point(arena_constructor:android.os.statsd.ApplicationInfo)
93 }
ApplicationInfo(const ApplicationInfo & from)94 ApplicationInfo::ApplicationInfo(const ApplicationInfo& from)
95   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
96   ApplicationInfo* const _this = this; (void)_this;
97   new (&_impl_) Impl_{
98       decltype(_impl_._has_bits_){from._impl_._has_bits_}
99     , /*decltype(_impl_._cached_size_)*/{}
100     , decltype(_impl_.version_string_){}
101     , decltype(_impl_.package_name_){}
102     , decltype(_impl_.installer_){}
103     , decltype(_impl_.certificate_hash_){}
104     , decltype(_impl_.version_){}
105     , decltype(_impl_.uid_){}};
106 
107   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
108   _impl_.version_string_.InitDefault();
109   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
110     _impl_.version_string_.Set("", GetArenaForAllocation());
111   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
112   if (from._internal_has_version_string()) {
113     _this->_impl_.version_string_.Set(from._internal_version_string(),
114       _this->GetArenaForAllocation());
115   }
116   _impl_.package_name_.InitDefault();
117   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
118     _impl_.package_name_.Set("", GetArenaForAllocation());
119   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
120   if (from._internal_has_package_name()) {
121     _this->_impl_.package_name_.Set(from._internal_package_name(),
122       _this->GetArenaForAllocation());
123   }
124   _impl_.installer_.InitDefault();
125   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
126     _impl_.installer_.Set("", GetArenaForAllocation());
127   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
128   if (from._internal_has_installer()) {
129     _this->_impl_.installer_.Set(from._internal_installer(),
130       _this->GetArenaForAllocation());
131   }
132   _impl_.certificate_hash_.InitDefault();
133   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
134     _impl_.certificate_hash_.Set("", GetArenaForAllocation());
135   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
136   if (from._internal_has_certificate_hash()) {
137     _this->_impl_.certificate_hash_.Set(from._internal_certificate_hash(),
138       _this->GetArenaForAllocation());
139   }
140   ::memcpy(&_impl_.version_, &from._impl_.version_,
141     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.uid_) -
142     reinterpret_cast<char*>(&_impl_.version_)) + sizeof(_impl_.uid_));
143   // @@protoc_insertion_point(copy_constructor:android.os.statsd.ApplicationInfo)
144 }
145 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)146 inline void ApplicationInfo::SharedCtor(
147     ::_pb::Arena* arena, bool is_message_owned) {
148   (void)arena;
149   (void)is_message_owned;
150   new (&_impl_) Impl_{
151       decltype(_impl_._has_bits_){}
152     , /*decltype(_impl_._cached_size_)*/{}
153     , decltype(_impl_.version_string_){}
154     , decltype(_impl_.package_name_){}
155     , decltype(_impl_.installer_){}
156     , decltype(_impl_.certificate_hash_){}
157     , decltype(_impl_.version_){::int64_t{0}}
158     , decltype(_impl_.uid_){0}
159   };
160   _impl_.version_string_.InitDefault();
161   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
162     _impl_.version_string_.Set("", GetArenaForAllocation());
163   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
164   _impl_.package_name_.InitDefault();
165   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
166     _impl_.package_name_.Set("", GetArenaForAllocation());
167   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
168   _impl_.installer_.InitDefault();
169   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
170     _impl_.installer_.Set("", GetArenaForAllocation());
171   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
172   _impl_.certificate_hash_.InitDefault();
173   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
174     _impl_.certificate_hash_.Set("", GetArenaForAllocation());
175   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
176 }
177 
~ApplicationInfo()178 ApplicationInfo::~ApplicationInfo() {
179   // @@protoc_insertion_point(destructor:android.os.statsd.ApplicationInfo)
180   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
181   (void)arena;
182     return;
183   }
184   SharedDtor();
185 }
186 
SharedDtor()187 inline void ApplicationInfo::SharedDtor() {
188   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
189   _impl_.version_string_.Destroy();
190   _impl_.package_name_.Destroy();
191   _impl_.installer_.Destroy();
192   _impl_.certificate_hash_.Destroy();
193 }
194 
SetCachedSize(int size) const195 void ApplicationInfo::SetCachedSize(int size) const {
196   _impl_._cached_size_.Set(size);
197 }
198 
Clear()199 void ApplicationInfo::Clear() {
200 // @@protoc_insertion_point(message_clear_start:android.os.statsd.ApplicationInfo)
201   ::uint32_t cached_has_bits = 0;
202   // Prevent compiler warnings about cached_has_bits being unused
203   (void) cached_has_bits;
204 
205   cached_has_bits = _impl_._has_bits_[0];
206   if (cached_has_bits & 0x0000000fu) {
207     if (cached_has_bits & 0x00000001u) {
208       _impl_.version_string_.ClearNonDefaultToEmpty();
209     }
210     if (cached_has_bits & 0x00000002u) {
211       _impl_.package_name_.ClearNonDefaultToEmpty();
212     }
213     if (cached_has_bits & 0x00000004u) {
214       _impl_.installer_.ClearNonDefaultToEmpty();
215     }
216     if (cached_has_bits & 0x00000008u) {
217       _impl_.certificate_hash_.ClearNonDefaultToEmpty();
218     }
219   }
220   if (cached_has_bits & 0x00000030u) {
221     ::memset(&_impl_.version_, 0, static_cast<size_t>(
222         reinterpret_cast<char*>(&_impl_.uid_) -
223         reinterpret_cast<char*>(&_impl_.version_)) + sizeof(_impl_.uid_));
224   }
225   _impl_._has_bits_.Clear();
226   _internal_metadata_.Clear<std::string>();
227 }
228 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)229 const char* ApplicationInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
230 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
231   _Internal::HasBits has_bits{};
232   while (!ctx->Done(&ptr)) {
233     ::uint32_t tag;
234     ptr = ::_pbi::ReadTag(ptr, &tag);
235     switch (tag >> 3) {
236       // optional int32 uid = 1;
237       case 1:
238         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
239           _Internal::set_has_uid(&has_bits);
240           _impl_.uid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
241           CHK_(ptr);
242         } else {
243           goto handle_unusual;
244         }
245         continue;
246       // optional int64 version = 2;
247       case 2:
248         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
249           _Internal::set_has_version(&has_bits);
250           _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
251           CHK_(ptr);
252         } else {
253           goto handle_unusual;
254         }
255         continue;
256       // optional string version_string = 3;
257       case 3:
258         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
259           auto str = _internal_mutable_version_string();
260           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
261           CHK_(ptr);
262         } else {
263           goto handle_unusual;
264         }
265         continue;
266       // optional string package_name = 4;
267       case 4:
268         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
269           auto str = _internal_mutable_package_name();
270           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
271           CHK_(ptr);
272         } else {
273           goto handle_unusual;
274         }
275         continue;
276       // optional string installer = 5;
277       case 5:
278         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
279           auto str = _internal_mutable_installer();
280           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
281           CHK_(ptr);
282         } else {
283           goto handle_unusual;
284         }
285         continue;
286       // optional bytes certificate_hash = 6;
287       case 6:
288         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
289           auto str = _internal_mutable_certificate_hash();
290           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
291           CHK_(ptr);
292         } else {
293           goto handle_unusual;
294         }
295         continue;
296       default:
297         goto handle_unusual;
298     }  // switch
299   handle_unusual:
300     if ((tag == 0) || ((tag & 7) == 4)) {
301       CHK_(ptr);
302       ctx->SetLastTag(tag);
303       goto message_done;
304     }
305     ptr = UnknownFieldParse(
306         tag,
307         _internal_metadata_.mutable_unknown_fields<std::string>(),
308         ptr, ctx);
309     CHK_(ptr != nullptr);
310   }  // while
311 message_done:
312   _impl_._has_bits_.Or(has_bits);
313   return ptr;
314 failure:
315   ptr = nullptr;
316   goto message_done;
317 #undef CHK_
318 }
319 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const320 ::uint8_t* ApplicationInfo::_InternalSerialize(
321     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
322   // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.ApplicationInfo)
323   ::uint32_t cached_has_bits = 0;
324   (void) cached_has_bits;
325 
326   cached_has_bits = _impl_._has_bits_[0];
327   // optional int32 uid = 1;
328   if (cached_has_bits & 0x00000020u) {
329     target = stream->EnsureSpace(target);
330     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_uid(), target);
331   }
332 
333   // optional int64 version = 2;
334   if (cached_has_bits & 0x00000010u) {
335     target = stream->EnsureSpace(target);
336     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_version(), target);
337   }
338 
339   // optional string version_string = 3;
340   if (cached_has_bits & 0x00000001u) {
341     target = stream->WriteStringMaybeAliased(
342         3, this->_internal_version_string(), target);
343   }
344 
345   // optional string package_name = 4;
346   if (cached_has_bits & 0x00000002u) {
347     target = stream->WriteStringMaybeAliased(
348         4, this->_internal_package_name(), target);
349   }
350 
351   // optional string installer = 5;
352   if (cached_has_bits & 0x00000004u) {
353     target = stream->WriteStringMaybeAliased(
354         5, this->_internal_installer(), target);
355   }
356 
357   // optional bytes certificate_hash = 6;
358   if (cached_has_bits & 0x00000008u) {
359     target = stream->WriteBytesMaybeAliased(
360         6, this->_internal_certificate_hash(), target);
361   }
362 
363   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
364     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
365         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
366   }
367   // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.ApplicationInfo)
368   return target;
369 }
370 
ByteSizeLong() const371 size_t ApplicationInfo::ByteSizeLong() const {
372 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.ApplicationInfo)
373   size_t total_size = 0;
374 
375   ::uint32_t cached_has_bits = 0;
376   // Prevent compiler warnings about cached_has_bits being unused
377   (void) cached_has_bits;
378 
379   cached_has_bits = _impl_._has_bits_[0];
380   if (cached_has_bits & 0x0000003fu) {
381     // optional string version_string = 3;
382     if (cached_has_bits & 0x00000001u) {
383       total_size += 1 +
384         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
385           this->_internal_version_string());
386     }
387 
388     // optional string package_name = 4;
389     if (cached_has_bits & 0x00000002u) {
390       total_size += 1 +
391         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
392           this->_internal_package_name());
393     }
394 
395     // optional string installer = 5;
396     if (cached_has_bits & 0x00000004u) {
397       total_size += 1 +
398         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
399           this->_internal_installer());
400     }
401 
402     // optional bytes certificate_hash = 6;
403     if (cached_has_bits & 0x00000008u) {
404       total_size += 1 +
405         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
406           this->_internal_certificate_hash());
407     }
408 
409     // optional int64 version = 2;
410     if (cached_has_bits & 0x00000010u) {
411       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_version());
412     }
413 
414     // optional int32 uid = 1;
415     if (cached_has_bits & 0x00000020u) {
416       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_uid());
417     }
418 
419   }
420   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
421     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
422   }
423   int cached_size = ::_pbi::ToCachedSize(total_size);
424   SetCachedSize(cached_size);
425   return total_size;
426 }
427 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)428 void ApplicationInfo::CheckTypeAndMergeFrom(
429     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
430   MergeFrom(*::_pbi::DownCast<const ApplicationInfo*>(
431       &from));
432 }
433 
MergeFrom(const ApplicationInfo & from)434 void ApplicationInfo::MergeFrom(const ApplicationInfo& from) {
435   ApplicationInfo* const _this = this;
436   // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.ApplicationInfo)
437   GOOGLE_DCHECK_NE(&from, _this);
438   ::uint32_t cached_has_bits = 0;
439   (void) cached_has_bits;
440 
441   cached_has_bits = from._impl_._has_bits_[0];
442   if (cached_has_bits & 0x0000003fu) {
443     if (cached_has_bits & 0x00000001u) {
444       _this->_internal_set_version_string(from._internal_version_string());
445     }
446     if (cached_has_bits & 0x00000002u) {
447       _this->_internal_set_package_name(from._internal_package_name());
448     }
449     if (cached_has_bits & 0x00000004u) {
450       _this->_internal_set_installer(from._internal_installer());
451     }
452     if (cached_has_bits & 0x00000008u) {
453       _this->_internal_set_certificate_hash(from._internal_certificate_hash());
454     }
455     if (cached_has_bits & 0x00000010u) {
456       _this->_impl_.version_ = from._impl_.version_;
457     }
458     if (cached_has_bits & 0x00000020u) {
459       _this->_impl_.uid_ = from._impl_.uid_;
460     }
461     _this->_impl_._has_bits_[0] |= cached_has_bits;
462   }
463   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
464 }
465 
CopyFrom(const ApplicationInfo & from)466 void ApplicationInfo::CopyFrom(const ApplicationInfo& from) {
467 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.ApplicationInfo)
468   if (&from == this) return;
469   Clear();
470   MergeFrom(from);
471 }
472 
IsInitialized() const473 bool ApplicationInfo::IsInitialized() const {
474   return true;
475 }
476 
InternalSwap(ApplicationInfo * other)477 void ApplicationInfo::InternalSwap(ApplicationInfo* other) {
478   using std::swap;
479   auto* lhs_arena = GetArenaForAllocation();
480   auto* rhs_arena = other->GetArenaForAllocation();
481   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
482   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
483   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
484       &_impl_.version_string_, lhs_arena,
485       &other->_impl_.version_string_, rhs_arena
486   );
487   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
488       &_impl_.package_name_, lhs_arena,
489       &other->_impl_.package_name_, rhs_arena
490   );
491   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
492       &_impl_.installer_, lhs_arena,
493       &other->_impl_.installer_, rhs_arena
494   );
495   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
496       &_impl_.certificate_hash_, lhs_arena,
497       &other->_impl_.certificate_hash_, rhs_arena
498   );
499   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
500       PROTOBUF_FIELD_OFFSET(ApplicationInfo, _impl_.uid_)
501       + sizeof(ApplicationInfo::_impl_.uid_)  // NOLINT
502       - PROTOBUF_FIELD_OFFSET(ApplicationInfo, _impl_.version_)>(
503           reinterpret_cast<char*>(&_impl_.version_),
504           reinterpret_cast<char*>(&other->_impl_.version_));
505 }
506 
GetTypeName() const507 std::string ApplicationInfo::GetTypeName() const {
508   return "android.os.statsd.ApplicationInfo";
509 }
510 
511 
512 // ===================================================================
513 
514 class UidData::_Internal {
515  public:
516 };
517 
UidData(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)518 UidData::UidData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
519                          bool is_message_owned)
520   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
521   SharedCtor(arena, is_message_owned);
522   // @@protoc_insertion_point(arena_constructor:android.os.statsd.UidData)
523 }
UidData(const UidData & from)524 UidData::UidData(const UidData& from)
525   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
526   UidData* const _this = this; (void)_this;
527   new (&_impl_) Impl_{
528       decltype(_impl_.app_info_){from._impl_.app_info_}
529     , /*decltype(_impl_._cached_size_)*/{}};
530 
531   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
532   // @@protoc_insertion_point(copy_constructor:android.os.statsd.UidData)
533 }
534 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)535 inline void UidData::SharedCtor(
536     ::_pb::Arena* arena, bool is_message_owned) {
537   (void)arena;
538   (void)is_message_owned;
539   new (&_impl_) Impl_{
540       decltype(_impl_.app_info_){arena}
541     , /*decltype(_impl_._cached_size_)*/{}
542   };
543 }
544 
~UidData()545 UidData::~UidData() {
546   // @@protoc_insertion_point(destructor:android.os.statsd.UidData)
547   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
548   (void)arena;
549     return;
550   }
551   SharedDtor();
552 }
553 
SharedDtor()554 inline void UidData::SharedDtor() {
555   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
556   _impl_.app_info_.~RepeatedPtrField();
557 }
558 
SetCachedSize(int size) const559 void UidData::SetCachedSize(int size) const {
560   _impl_._cached_size_.Set(size);
561 }
562 
Clear()563 void UidData::Clear() {
564 // @@protoc_insertion_point(message_clear_start:android.os.statsd.UidData)
565   ::uint32_t cached_has_bits = 0;
566   // Prevent compiler warnings about cached_has_bits being unused
567   (void) cached_has_bits;
568 
569   _impl_.app_info_.Clear();
570   _internal_metadata_.Clear<std::string>();
571 }
572 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)573 const char* UidData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
574 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
575   while (!ctx->Done(&ptr)) {
576     ::uint32_t tag;
577     ptr = ::_pbi::ReadTag(ptr, &tag);
578     switch (tag >> 3) {
579       // repeated .android.os.statsd.ApplicationInfo app_info = 1;
580       case 1:
581         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
582           ptr -= 1;
583           do {
584             ptr += 1;
585             ptr = ctx->ParseMessage(_internal_add_app_info(), ptr);
586             CHK_(ptr);
587             if (!ctx->DataAvailable(ptr)) break;
588           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
589         } else {
590           goto handle_unusual;
591         }
592         continue;
593       default:
594         goto handle_unusual;
595     }  // switch
596   handle_unusual:
597     if ((tag == 0) || ((tag & 7) == 4)) {
598       CHK_(ptr);
599       ctx->SetLastTag(tag);
600       goto message_done;
601     }
602     ptr = UnknownFieldParse(
603         tag,
604         _internal_metadata_.mutable_unknown_fields<std::string>(),
605         ptr, ctx);
606     CHK_(ptr != nullptr);
607   }  // while
608 message_done:
609   return ptr;
610 failure:
611   ptr = nullptr;
612   goto message_done;
613 #undef CHK_
614 }
615 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const616 ::uint8_t* UidData::_InternalSerialize(
617     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
618   // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.UidData)
619   ::uint32_t cached_has_bits = 0;
620   (void) cached_has_bits;
621 
622   // repeated .android.os.statsd.ApplicationInfo app_info = 1;
623   for (unsigned i = 0,
624       n = static_cast<unsigned>(this->_internal_app_info_size()); i < n; i++) {
625     const auto& repfield = this->_internal_app_info(i);
626     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
627         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
628   }
629 
630   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
631     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
632         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
633   }
634   // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.UidData)
635   return target;
636 }
637 
ByteSizeLong() const638 size_t UidData::ByteSizeLong() const {
639 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.UidData)
640   size_t total_size = 0;
641 
642   ::uint32_t cached_has_bits = 0;
643   // Prevent compiler warnings about cached_has_bits being unused
644   (void) cached_has_bits;
645 
646   // repeated .android.os.statsd.ApplicationInfo app_info = 1;
647   total_size += 1UL * this->_internal_app_info_size();
648   for (const auto& msg : this->_impl_.app_info_) {
649     total_size +=
650       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
651   }
652 
653   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
654     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
655   }
656   int cached_size = ::_pbi::ToCachedSize(total_size);
657   SetCachedSize(cached_size);
658   return total_size;
659 }
660 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)661 void UidData::CheckTypeAndMergeFrom(
662     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
663   MergeFrom(*::_pbi::DownCast<const UidData*>(
664       &from));
665 }
666 
MergeFrom(const UidData & from)667 void UidData::MergeFrom(const UidData& from) {
668   UidData* const _this = this;
669   // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.UidData)
670   GOOGLE_DCHECK_NE(&from, _this);
671   ::uint32_t cached_has_bits = 0;
672   (void) cached_has_bits;
673 
674   _this->_impl_.app_info_.MergeFrom(from._impl_.app_info_);
675   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
676 }
677 
CopyFrom(const UidData & from)678 void UidData::CopyFrom(const UidData& from) {
679 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.UidData)
680   if (&from == this) return;
681   Clear();
682   MergeFrom(from);
683 }
684 
IsInitialized() const685 bool UidData::IsInitialized() const {
686   return true;
687 }
688 
InternalSwap(UidData * other)689 void UidData::InternalSwap(UidData* other) {
690   using std::swap;
691   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
692   _impl_.app_info_.InternalSwap(&other->_impl_.app_info_);
693 }
694 
GetTypeName() const695 std::string UidData::GetTypeName() const {
696   return "android.os.statsd.UidData";
697 }
698 
699 
700 // @@protoc_insertion_point(namespace_scope)
701 }  // namespace statsd
702 }  // namespace os
703 }  // namespace android
704 PROTOBUF_NAMESPACE_OPEN
705 template<> PROTOBUF_NOINLINE ::android::os::statsd::ApplicationInfo*
CreateMaybeMessage(Arena * arena)706 Arena::CreateMaybeMessage< ::android::os::statsd::ApplicationInfo >(Arena* arena) {
707   return Arena::CreateMessageInternal< ::android::os::statsd::ApplicationInfo >(arena);
708 }
709 template<> PROTOBUF_NOINLINE ::android::os::statsd::UidData*
CreateMaybeMessage(Arena * arena)710 Arena::CreateMaybeMessage< ::android::os::statsd::UidData >(Arena* arena) {
711   return Arena::CreateMessageInternal< ::android::os::statsd::UidData >(arena);
712 }
713 PROTOBUF_NAMESPACE_CLOSE
714 
715 // @@protoc_insertion_point(global_scope)
716 #include <google/protobuf/port_undef.inc>
717