Move libstatssocket to shared.
This fixes the boot loop when zygote tries to log to statsd during boot time. Linking libstatssocket statically from two different places causes translation errors resulting in multiple instances of the same struct being created. This meant that the struct is no longer shared across the same process for opening/closing of the socket. Bug: 149889582 Test: Phone boots Change-Id: Ibfa25c0fe7874ba08157a5ec43601c5cf8305723
This commit is contained in:
@@ -63,11 +63,7 @@ cc_library_shared {
|
||||
shared_libs: [
|
||||
"libnativehelper", // Has stable abi - should not be copied into apex.
|
||||
"liblog", // Has a stable abi - should not be copied into apex.
|
||||
],
|
||||
static_libs: [
|
||||
//TODO: make shared - need libstatssocket to also live in the apex.
|
||||
"libstatssocket",
|
||||
"libcutils", // TODO: remove - needed by libstatssocket
|
||||
],
|
||||
//TODO: is libc++_static correct?
|
||||
stl: "libc++_static",
|
||||
|
||||
@@ -55,11 +55,8 @@ public class MetricsLogger {
|
||||
protected void saveLog(LogMaker log) {
|
||||
// TODO(b/116684537): Flag guard logging to event log and statsd socket.
|
||||
EventLogTags.writeSysuiMultiAction(log.serialize());
|
||||
if (log.getCategory() != MetricsEvent.RESERVED_FOR_LOGBUILDER_COUNTER
|
||||
&& log.getCategory() != MetricsEvent.RESERVED_FOR_LOGBUILDER_HISTOGRAM) {
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.KEY_VALUE_PAIRS_ATOM,
|
||||
/* UID is retrieved from statsd side */ 0, log.getEntries());
|
||||
}
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.KEY_VALUE_PAIRS_ATOM,
|
||||
/* UID is retrieved from statsd side */ 0, log.getEntries());
|
||||
}
|
||||
|
||||
public static final int VIEW_UNKNOWN = MetricsEvent.VIEW_UNKNOWN;
|
||||
|
||||
@@ -208,7 +208,6 @@ cc_library_shared {
|
||||
"libseccomp_policy",
|
||||
"libgrallocusage",
|
||||
"libscrypt_static",
|
||||
"libstatssocket",
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
@@ -266,6 +265,7 @@ cc_library_shared {
|
||||
"libdl",
|
||||
"libdl_android",
|
||||
"libstatslog",
|
||||
"libstatssocket",
|
||||
"libtimeinstate",
|
||||
"server_configurable_flags",
|
||||
"libstatspull",
|
||||
|
||||
Reference in New Issue
Block a user