Commit Graph

2 Commits

Author SHA1 Message Date
Muhammad Qureshi
01268dec13 Handle nulls in Java autogeneration
Bug: 143979391
Test: m -j
Change-Id: I93146faa1976cac195c2250832d12ee4a09ae969
Merged-In: I93146faa1976cac195c2250832d12ee4a09ae969
2020-01-08 17:02:22 -08:00
Muhammad Qureshi
ef19b08b05 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
Merged-In: I4c804eaf4d5ae78001146c89ebe46dfb0a453853
2020-01-08 17:01:43 -08:00