Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21f7e6a3 authored by Jeffrey Huang's avatar Jeffrey Huang
Browse files

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
parent 27f83cdb
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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",
+2 −5
Original line number Diff line number Diff line
@@ -55,12 +55,9 @@ 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());
    }
    }

    public static final int VIEW_UNKNOWN = MetricsEvent.VIEW_UNKNOWN;
    public static final int LOGTAG = EventLogTags.SYSUI_MULTI_ACTION;
+1 −1
Original line number Diff line number Diff line
@@ -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",