Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7f844c6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "aapt2: Fix deprecated proto API usage." am: 29926802 am: aeaa62c5...

Merge "aapt2: Fix deprecated proto API usage." am: 29926802 am: aeaa62c5 am: d682efe2 am: 2138ab23

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2176683



Change-Id: I1d362eba5c9632c8bab73f9bd4f526a55b47ac61
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5b7bf787 2138ab23
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ bool ContainerWriter::AddResTableEntry(const pb::ResourceTable& table) {
  coded_out.WriteLittleEndian32(kResTable);

  // Write the aligned size.
  const ::google::protobuf::uint64 size = table.ByteSize();
  const size_t size = table.ByteSizeLong();
  const int padding = CalculatePaddingForAlignment(size);
  coded_out.WriteLittleEndian64(size);

@@ -109,7 +109,7 @@ bool ContainerWriter::AddResFileEntry(const pb::internal::CompiledFile& file,
  coded_out.WriteLittleEndian32(kResFile);

  // Write the aligned size.
  const ::google::protobuf::uint32 header_size = file.ByteSize();
  const size_t header_size = file.ByteSizeLong();
  const int header_padding = CalculatePaddingForAlignment(header_size);
  const ::google::protobuf::uint64 data_size = in->TotalSize();
  const int data_padding = CalculatePaddingForAlignment(data_size);
+1 −2
Original line number Diff line number Diff line
@@ -131,8 +131,7 @@ class ProtoInputStreamReader {
  template <typename T> bool ReadMessage(T *message) {
    ZeroCopyInputAdaptor adapter(in_);
    google::protobuf::io::CodedInputStream coded_stream(&adapter);
    coded_stream.SetTotalBytesLimit(std::numeric_limits<int32_t>::max(),
                                    coded_stream.BytesUntilTotalBytesLimit());
    coded_stream.SetTotalBytesLimit(std::numeric_limits<int32_t>::max());
    return message->ParseFromCodedStream(&coded_stream);
  }