Loading libstats/pull/Android.bp +20 −5 Original line number Diff line number Diff line Loading @@ -17,8 +17,8 @@ // ========================================================== // Native library to register a pull atom callback with statsd // ========================================================== cc_library_shared { name: "libstatspull", cc_defaults { name: "libstatspull_defaults", srcs: [ "stats_pull_atom_callback.cpp", ], Loading @@ -31,12 +31,16 @@ cc_library_shared { "libbinder_ndk", "liblog", "statsd-aidl-ndk_platform", "libstatssocket", ], static_libs: [ "libutils", // TODO(b/149340100): Clean this up when libstatssocket is moved to the apex. "libstatssocket", "libcutils", ], } cc_library_shared { name: "libstatspull", defaults: [ "libstatspull_defaults" ], // enumerate stable entry points for APEX use stubs: { Loading @@ -50,3 +54,14 @@ cc_library_shared { "test_com.android.os.statsd", ], } // ONLY USE IN TESTS. cc_library_static { name: "libstatspull_private", defaults: [ "libstatspull_defaults", ], visibility: [ "//frameworks/base/apex/statsd/tests/libstatspull", ], } libstats/socket/Android.bp +40 −10 Original line number Diff line number Diff line Loading @@ -17,23 +17,43 @@ // ========================================================================= // Native library to write stats log to statsd socket on Android R and later // ========================================================================= cc_library { name: "libstatssocket", cc_defaults { name: "libstatssocket_defaults", srcs: [ "stats_buffer_writer.c", "stats_event.c", "stats_socket.c", "statsd_writer.c", ], host_supported: true, export_include_dirs: ["include"], static_libs: [ "libcutils", // does not expose a stable C API ], cflags: [ "-Wall", "-Werror", ], export_include_dirs: ["include"], static_libs: [ "libcutils", // does not expose a stable C API } cc_library { 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 stubs: { Loading @@ -43,13 +63,23 @@ cc_library { ], }, apex_available: [ //TODO(b/149340100): Remove this once libstatssocket is only linked as shared. "//apex_available:platform", "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 { name: "libstatssocket_headers", export_include_dirs: ["include"], Loading @@ -67,7 +97,7 @@ cc_benchmark { "-Werror", ], static_libs: [ "libstatssocket", "libstatssocket_private", ], shared_libs: [ "libcutils", Loading @@ -84,7 +114,7 @@ cc_test { ], static_libs: [ "libgmock", "libstatssocket", "libstatssocket_private", ], shared_libs: [ "libcutils", Loading Loading
libstats/pull/Android.bp +20 −5 Original line number Diff line number Diff line Loading @@ -17,8 +17,8 @@ // ========================================================== // Native library to register a pull atom callback with statsd // ========================================================== cc_library_shared { name: "libstatspull", cc_defaults { name: "libstatspull_defaults", srcs: [ "stats_pull_atom_callback.cpp", ], Loading @@ -31,12 +31,16 @@ cc_library_shared { "libbinder_ndk", "liblog", "statsd-aidl-ndk_platform", "libstatssocket", ], static_libs: [ "libutils", // TODO(b/149340100): Clean this up when libstatssocket is moved to the apex. "libstatssocket", "libcutils", ], } cc_library_shared { name: "libstatspull", defaults: [ "libstatspull_defaults" ], // enumerate stable entry points for APEX use stubs: { Loading @@ -50,3 +54,14 @@ cc_library_shared { "test_com.android.os.statsd", ], } // ONLY USE IN TESTS. cc_library_static { name: "libstatspull_private", defaults: [ "libstatspull_defaults", ], visibility: [ "//frameworks/base/apex/statsd/tests/libstatspull", ], }
libstats/socket/Android.bp +40 −10 Original line number Diff line number Diff line Loading @@ -17,23 +17,43 @@ // ========================================================================= // Native library to write stats log to statsd socket on Android R and later // ========================================================================= cc_library { name: "libstatssocket", cc_defaults { name: "libstatssocket_defaults", srcs: [ "stats_buffer_writer.c", "stats_event.c", "stats_socket.c", "statsd_writer.c", ], host_supported: true, export_include_dirs: ["include"], static_libs: [ "libcutils", // does not expose a stable C API ], cflags: [ "-Wall", "-Werror", ], export_include_dirs: ["include"], static_libs: [ "libcutils", // does not expose a stable C API } cc_library { 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 stubs: { Loading @@ -43,13 +63,23 @@ cc_library { ], }, apex_available: [ //TODO(b/149340100): Remove this once libstatssocket is only linked as shared. "//apex_available:platform", "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 { name: "libstatssocket_headers", export_include_dirs: ["include"], Loading @@ -67,7 +97,7 @@ cc_benchmark { "-Werror", ], static_libs: [ "libstatssocket", "libstatssocket_private", ], shared_libs: [ "libcutils", Loading @@ -84,7 +114,7 @@ cc_test { ], static_libs: [ "libgmock", "libstatssocket", "libstatssocket_private", ], shared_libs: [ "libcutils", Loading