OSDN Git Service

Add byte size of the bytes fields to statslog c++ APIs.
authorYao Chen <yaochen@google.com>
Thu, 6 Dec 2018 18:34:25 +0000 (10:34 -0800)
committerJack He <siyuanh@google.com>
Sat, 15 Dec 2018 21:52:47 +0000 (13:52 -0800)
commitd66ecfccf6f5a1be8f934776dfe72e5bf9c779ec
treec523edb8be2d421c72178d2af0db7f5f29813e26
parent2822b4f42f49650b194f6561454aeb48f4f3d9d1
Add byte size of the bytes fields to statslog c++ APIs.

The proto binary data can contain '\0's and in the native layer,
the current liblog api would convert that into string and thus
the data is truncated.

This CL adds a "size_t bytes_field_len" after the bytes fields so that
we can correctly pass the data from JAVA to native.

Java StatsLog.write() APIs remain the same

Bug: 120635548
Test: test_drive with atom 103
Change-Id: I34f1c4ddd6a4ec5f3604b0c67a47a5399e3c6ddd
Merged-In: I34f1c4ddd6a4ec5f3604b0c67a47a5399e3c6ddd
(cherry picked from commit 1fe9f594984b47144b958f0ac423eeffc56b62ea)
tools/stats_log_api_gen/main.cpp