1// 2// Copyright (C) 2017 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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_library { 22 name: "libnetworkstats", 23 vendor_available: false, 24 host_supported: false, 25 header_libs: ["bpf_connectivity_headers"], 26 srcs: [ 27 "BpfNetworkStats.cpp" 28 ], 29 shared_libs: [ 30 "libbase", 31 "liblog", 32 ], 33 export_include_dirs: ["include"], 34 cflags: [ 35 "-Wall", 36 "-Werror", 37 "-Wno-unused-parameter", 38 "-Wthread-safety", 39 ], 40 sanitize: { 41 cfi: true, 42 }, 43 apex_available: [ 44 "com.android.tethering", 45 ], 46 min_sdk_version: "30", 47} 48 49cc_test { 50 name: "libnetworkstats_test", 51 test_suites: ["general-tests"], 52 require_root: true, // required by setrlimitForTest() 53 header_libs: ["bpf_connectivity_headers"], 54 srcs: [ 55 "BpfNetworkStatsTest.cpp", 56 ], 57 cflags: [ 58 "-Wall", 59 "-Werror", 60 "-Wno-unused-parameter", 61 "-Wthread-safety", 62 ], 63 static_libs: [ 64 "libgmock", 65 "libnetworkstats", 66 ], 67 shared_libs: [ 68 "libbase", 69 "liblog", 70 ], 71} 72