Use StatsEvent in Java autogenerated code
The change is guarded by STATS_SCHEMA_LEGACY flag in the autogenerator
Android.bp.
The flag can only be removed once rest of statsd switches over to the
new socket schema.
The new autogeneration uses StatsEvent for both Mainline module
clients and the default platform client. For Mainline modules, the
autogenerated code uses a runtime dessert version check to use new
socket schema on R+ platforms and the legacy schema on the older
platforms.
The legacy schema is encapsulated in a separate autogenerated inner
class called QLogger.
generated DocumentsStatsLog.java: https://paste.googleplex.com/4665805503463424
generated StatsLogInternal.java: https://paste.googleplex.com/5955095055302656
generated android_util_StatsLogInternal.cpp:
https://paste.googleplex.com/6737331711115264
Bug: 142811546
Test: m -j && m -j DocumentsUIGoogle
Test: Flashes successfully and events are logged to statsd
Change-Id: I4c804eaf4d5ae78001146c89ebe46dfb0a453853
8 files changed