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

Commit 3e0ec0f7 authored by Jiyong Park's avatar Jiyong Park
Browse files

Revert "Make libstatssocket a shared_lib"

This reverts commit 29512fbf.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Test: m on full-eng

Merged-In: I5889dd718536f5f2c693b4c2e7331c9cc2eb2ac9
Change-Id: If28b7590d4e58e44a24581f3b5891b2441504801
parent 29512fbf
Loading
Loading
Loading
Loading
+10 −46
Original line number Original line Diff line number Diff line
@@ -17,8 +17,8 @@
// =========================================================================
// =========================================================================
// Native library to write stats log to statsd socket on Android R and later
// Native library to write stats log to statsd socket on Android R and later
// =========================================================================
// =========================================================================
cc_defaults {
cc_library {
    name: "libstatssocket_defaults",
    name: "libstatssocket",
    srcs: [
    srcs: [
        "stats_buffer_writer.c",
        "stats_buffer_writer.c",
        "stats_event.c",
        "stats_event.c",
@@ -27,10 +27,7 @@ cc_defaults {
        "stats_event_list.c",
        "stats_event_list.c",
        "statsd_writer.c",
        "statsd_writer.c",
    ],
    ],
    export_include_dirs: ["include"],
    host_supported: true,
    static_libs: [
        "libcutils", // does not expose a stable C API
    ],
    cflags: [
    cflags: [
        "-Wall",
        "-Wall",
        "-Werror",
        "-Werror",
@@ -38,28 +35,11 @@ cc_defaults {
        "-DWRITE_TO_STATSD=1",
        "-DWRITE_TO_STATSD=1",
        "-DWRITE_TO_LOGD=0",
        "-DWRITE_TO_LOGD=0",
    ],
    ],
}
    export_include_dirs: ["include"],

    shared_libs: [

        "libcutils",
cc_library {
        "liblog",
    name: "libstatssocket",
    defaults: [
        "libstatssocket_defaults",
    ],
    ],
    host_supported: true,
    target: {
        // On android, libstatssocket should only be linked as a shared lib
        android: {
            static: {
                enabled: false,
            },
        },
        host: {
            shared: {
                enabled: false,
            },
        },
    },


    // enumerate stable entry points for APEX use
    // enumerate stable entry points for APEX use
    stubs: {
    stubs: {
@@ -67,23 +47,7 @@ cc_library {
        versions: [
        versions: [
            "1",
            "1",
        ],
        ],
    },
    apex_available: [
        "com.android.os.statsd",
        "test_com.android.os.statsd",
    ],
    }
    }

//TODO (b/149842105): Figure out if there is a better solution for this.
cc_test_library {
    name: "libstatssocket_private",
    defaults: [
        "libstatssocket_defaults",
    ],
    visibility: [
        "//frameworks/base/apex/statsd/tests/libstatspull",
        "//frameworks/base/cmds/statsd",
    ],
}
}


cc_library_headers {
cc_library_headers {
@@ -105,7 +69,7 @@ cc_benchmark {
        "-Werror",
        "-Werror",
    ],
    ],
    static_libs: [
    static_libs: [
        "libstatssocket_private",
        "libstatssocket",
    ],
    ],
    shared_libs: [
    shared_libs: [
        "libcutils",
        "libcutils",
@@ -123,7 +87,7 @@ cc_test {
    ],
    ],
    static_libs: [
    static_libs: [
        "libgmock",
        "libgmock",
        "libstatssocket_private",
        "libstatssocket",
    ],
    ],
    shared_libs: [
    shared_libs: [
        "libcutils",
        "libcutils",