Check the size of the strings in the StringPool before flattening.

Test: Tested for normal functionality when string does not exceed
maximum length and tests for detection of string that is too lonhg for
UTF8i
Bug: b/74176037

Change-Id: Ic71d3671a069e7012e8ca107e79e071499eebbf6
diff --git a/tools/aapt2/cmd/Convert.cpp b/tools/aapt2/cmd/Convert.cpp
index 56bf487..3c8beaa 100644
--- a/tools/aapt2/cmd/Convert.cpp
+++ b/tools/aapt2/cmd/Convert.cpp
@@ -226,7 +226,7 @@
 
   bool SerializeTable(ResourceTable* table, IArchiveWriter* writer) override {
     pb::ResourceTable pb_table;
-    SerializeTableToPb(*table, &pb_table);
+    SerializeTableToPb(*table, &pb_table, context_->GetDiagnostics());
     return io::CopyProtoToArchive(context_, &pb_table, kProtoResourceTablePath,
                                   ArchiveEntry::kCompress, writer);
   }