OSDN Git Service

Statsd: Enable host_supported for libstatslog
authorJack He <siyuanh@google.com>
Thu, 20 Dec 2018 08:42:31 +0000 (00:42 -0800)
committerJack He <siyuanh@google.com>
Thu, 20 Dec 2018 08:56:15 +0000 (00:56 -0800)
commit34a892d2f5d770ceea4d7a5bbb6de2bb41588f4d
treea95ac5f92b72ad3249d04bd7e961a4deb685b702
parent783ec049091357ae892d4c62e4e75008734815e7
Statsd: Enable host_supported for libstatslog

* libutils must be used as a static library when compiled on host
* Host does not have Android system properties and hence we cannot
  use <cutils/properties.h>. In fact, properties.cpp is not even
  compiled on host for libcutils. Therefore, this CL adds a check
  for __ANDROID__ macro before including <sys/propoerties.h> and
  before calling properties_get_bool()
* On host, statsd logging will be disabled since host does not
  use statsd for anything

Fixes: 121294178
Test: test drive statsd
Change-Id: I838ff02468c650c5f7d85e68fa5008b98f08ce8c
tools/stats_log_api_gen/Android.bp
tools/stats_log_api_gen/main.cpp