1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17// ========================================================================= 18// Native library that toggles between the old and new statsd socket 19// protocols. This library should only be used by DNS resolver or other 20// native modules on Q that log pushed atoms to statsd. 21// ========================================================================= 22cc_defaults { 23 name: "libstatspush_compat_defaults", 24 srcs: [ 25 "statsd_writer.c", 26 "stats_event_list.c", 27 "StatsEventCompat.cpp" 28 ], 29 cflags: [ 30 "-Wall", 31 "-Werror", 32 "-DWRITE_TO_STATSD=1", 33 "-DWRITE_TO_LOGD=0", 34 ], 35 header_libs: ["libstatssocket_headers"], 36 static_libs: [ 37 "libbase", 38 ], 39 shared_libs: [ 40 "liblog", 41 "libutils", 42 ], 43} 44 45cc_library { 46 name: "libstatspush_compat", 47 defaults: ["libstatspush_compat_defaults"], 48 export_include_dirs: ["include"], 49 static_libs: ["libgtest_prod"], 50 apex_available: ["com.android.resolv"], 51 min_sdk_version: "29", 52} 53 54cc_test { 55 name: "libstatspush_compat_test", 56 defaults: ["libstatspush_compat_defaults"], 57 test_suites: ["device_tests"], 58 srcs: [ 59 "tests/StatsEventCompat_test.cpp", 60 ], 61 static_libs: ["libgmock"], 62} 63 64