Early processes might not have access to libstatssocket. They should be
able to check before using libstatssocket APIs. Adding isAvailable().
Bug: 281162849
Test: atest libstatssocket_lazy_test
Test: atest StagedRollbackTest
Change-Id: Ie2a851ef5bcf4fe081898153d688a843d8886788
Added SPDX-license-identifier-Apache-2.0 to:
libstats/pull_lazy/Android.bp
libstats/socket_lazy/Android.bp
trusty/utils/acvp/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I33005150521238b61d1a8c923749b17d36bba693
Add lazy loading support to libstatssocket.
There are many clients of libstatssocket (lmkd, surfaceflinger,
bootanimation dependencies) that run before the statsd apex is mounted
and cannot link libstatssocket.so when the process starts. Lazy loading
will load the library when the logging apis get called.
This change is modeled heavily off of aosp/1570701, which added
libnativehelper_lazy.
Bug: 178480419
Test: atest libstatssocket_lazy_test
Change-Id: I57e6f698ad43dddc98dc787ba2fe888030c8a282