aapt2: Fix deprecated proto API usage.
Bug: 203713560
Test: presubmit
Change-Id: Ie8bb2c010cff1c2e861918496290d1ef6dd6daef
diff --git a/tools/aapt2/io/Util.h b/tools/aapt2/io/Util.h
index 5cb8206..1b48a28 100644
--- a/tools/aapt2/io/Util.h
+++ b/tools/aapt2/io/Util.h
@@ -131,8 +131,7 @@
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);
}