platform_system_core/libstats/push_compat
Muhammad Qureshi 9b9584b1a3 Increase size limit for pulled AStatsEvent
Increase AStatsEvent max byte size to 50 KB for pulled events.
All AStatsEvent instances are treated as pulled events unless
AStatsEvent_write() is called.

- Set the default max size to 50 KB
- The starting buffer size is still ~4 KB for pushed and pulled events.
- If a write would exceed the buffer bounds, double buffer size until
write fits or 50 KB limit is exceeded in which case the overflow bit is
set to true.
- If AStatsEvent_write() is called, max size is set to ~4 KB. And if
the current payload exceeds this limit, set overflow bit to true.

- Fix error mask checking in stats_event_test.
- Set ERROR_NO_ATOM_ID when atom id is missing.
- Make sure tests don't hit ERROR_TOO_MANY_FIELDS when testing buffer
overflow.
- Rename event->size to event->numBytesWritten

Fixes: 158214941
Test: libstatssocket_test
Change-Id: Ia26aeb775f7e4f2ffe87707bab6d0119e21da10e
2020-06-09 20:12:42 -07:00
..
include Use dlsym to load libstatssocket API 2020-03-09 15:16:11 -07:00
tests Use proper platform version checks (libstats) 2020-05-07 12:31:39 -07:00
Android.bp stats: Set min_sdk_version 2020-05-02 02:29:19 +09:00
stats_event_list.c Merge libstatspush_compat and libstatssocket_q 2019-12-16 15:24:36 -08:00
statsd_writer.c Merge libstatspush_compat and libstatssocket_q 2019-12-16 15:24:36 -08:00
statsd_writer.h Merge libstatspush_compat and libstatssocket_q 2019-12-16 15:24:36 -08:00
StatsEventCompat.cpp Increase size limit for pulled AStatsEvent 2020-06-09 20:12:42 -07:00