Since libstatspull will be placed within the APEX, we need to move to
libbinder_ndk.
Test: m -j libstatspull
Test: atest LibStatsPullTests
Bug: 145213327
Change-Id: I86dd6e759efa5eb20bffc76492d5fa72cf279872
Libstatspull will ship as a part of the statsd apex in R.
Also update libstatssocket to have version 30 to align with api level,
as per native api council feedback.
Change both libraries to use NDK style naming conventions (AStatsEvent,
AStatsManager), and remove unneeded APIs in libstatssocket.
Remove KeyValuePairs from libstatssocket. KeyValuePairs will not be
supported in native code.
Bug: 147499386
Test: make libstatspull
Test: make libstatssocket
Test: atest libstatssocket_test
Change-Id: Ie79771461215a057529aaac91db95e4334c3960e
This cl modifies getStatsService to use the blocking getService, but
also makes the binder call in a separate thread to not block the client
thread. This is needed because it is possible for pullers to be
registered before statsd starts, and calling checkService before statsd
is up will fail. We also would never receive the binderDied to register
it, because we would never have a binder object to linkToDeath on.
Bug: 147682855
Test: atest LibStatsPullTests
Change-Id: I68c04bc24c7fe066eca88cab4f6a76885581c1ee
Changes the API to return an int instead of a bool.
Creates API to unregister pullers.
Test: atest LibStatsPullTests
Bug: 144373250
Change-Id: I6d395237082337a22f37190343a1fc59703d39bf
Create a new library for the native puller callback API. The library has
2 main interfaces: register_stats_pull_atom_callback, which is used to
register a callback, and stats_pull_atom_callback_t, which is the
callback for the puller. It also exposes pulled_stats_event_list, which
is a struct wrapper around a vector of stats_event.
Test: make libstatspull
Bug: 142969725
Change-Id: I14fe4dc523d6f81fdeaa3fe6fad3e95aeecfe92e