1//
2// Copyright (C) 2021 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    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: [
24        "//device/google/zumapro:device_google_zumapro_license",
25    ],
26}
27
28cc_binary {
29    name: "android.hardware.usb-service",
30    relative_install_path: "hw",
31    vintf_fragments: ["android.hardware.usb-service.xml"],
32    vendor: true,
33    srcs: [
34        "service.cpp",
35        "Usb.cpp",
36        "UsbDataSessionMonitor.cpp",
37    ],
38    shared_libs: [
39        "libbase",
40        "libbinder",
41        "libhidlbase",
42        "liblog",
43        "libusbhost",
44        "libutils",
45        "libhardware",
46        "[email protected]",
47        "[email protected]",
48        "android.hardware.thermal-V1-ndk",
49        "[email protected]",
50        "android.hardware.usb-V3-ndk",
51        "android.hardware.usb.gadget-V1-ndk",
52        "libcutils",
53        "android.frameworks.stats-V2-ndk",
54        "pixelatoms-cpp",
55        "libbinder_ndk",
56        "libprotobuf-cpp-lite",
57        "server_configurable_flags",
58        "libaconfig_storage_read_api_cc",
59    ],
60    static_libs: [
61        "libpixelusb-aidl",
62        "libpixelstats",
63        "libthermalutils",
64        "android.hardware.usb.flags-aconfig-c-lib",
65    ],
66    export_shared_lib_headers: [
67        "android.frameworks.stats-V2-ndk",
68        "pixelatoms-cpp",
69    ],
70}
71
72prebuilt_etc {
73    name: "usb_service_init_rc_i2c6",
74    vendor: true,
75    filename: "android.hardware.usb-service-i2c6.rc",
76    src: "android.hardware.usb-service-i2c6.rc",
77    sub_dir: "init",
78}
79
80prebuilt_etc {
81    name: "usb_service_init_rc_i2c11",
82    vendor: true,
83    filename: "android.hardware.usb-service-i2c11.rc",
84    src: "android.hardware.usb-service-i2c11.rc",
85    sub_dir: "init",
86}
87
88cc_aconfig_library {
89    name: "android.hardware.usb.flags-aconfig-c-lib",
90    vendor: true,
91    aconfig_declarations: "android.hardware.usb.flags-aconfig",
92}
93