diff --git a/bluetooth/Android.bp b/bluetooth/Android.bp index 3f4ba99..101d3de 100644 --- a/bluetooth/Android.bp +++ b/bluetooth/Android.bp @@ -1,13 +1,23 @@ -package { - default_applicable_licenses: ["Android-Apache-2.0"], -} +// Copyright (C) 2020 The Android Open Source Project +// Copyright (C) 2024 KonstaKANG +// +// SPDX-License-Identifier: Apache-2.0 -cc_defaults { - name: "android.hardware.bluetooth-service-build-defaults", +cc_binary { + name: "android.hardware.bluetooth-service.rpi", + relative_install_path: "hw", + init_rc: ["bluetooth-service-rpi.rc"], + vintf_fragments: ["bluetooth-service-rpi.xml"], + vendor: true, cflags: [ "-Wall", "-Wextra", ], + srcs: [ + "BluetoothHci.cpp", + "net_bluetooth_mgmt.cpp", + "service.cpp", + ], shared_libs: [ "android.hardware.bluetooth-V1-ndk", "libbase", @@ -22,64 +32,3 @@ cc_defaults { "android.hardware.bluetooth.hci", ], } - -cc_library_static { - name: "libbluetoothhcihalimpl", - vendor_available: true, - host_supported: true, - defaults: ["android.hardware.bluetooth-service-build-defaults"], - srcs: [ - "BluetoothHci.cpp", - "net_bluetooth_mgmt.cpp", - ], -} - -cc_binary { - name: "android.hardware.bluetooth-service.default", - relative_install_path: "hw", - init_rc: ["bluetooth-service-default.rc"], - vintf_fragments: [":manifest_android.hardware.bluetooth-service.default.xml"], - vendor: true, - defaults: ["android.hardware.bluetooth-service-build-defaults"], - srcs: [ - "service.cpp", - ], - shared_libs: [ - "android.hardware.bluetooth-V1-ndk", - "libbase", - "libbinder_ndk", - "libhidlbase", - "libutils", - "liblog", - ], - static_libs: [ - "libbluetoothhcihalimpl", - ], -} - -cc_fuzz { - name: "android.hardware.bluetooth-service.default_fuzzer", - host_supported: true, - defaults: ["service_fuzzer_defaults"], - srcs: [ - "test/fuzzer.cpp", - ], - static_libs: [ - "android.hardware.bluetooth.async", - "android.hardware.bluetooth.hci", - "android.hardware.bluetooth-V1-ndk", - "libbluetoothhcihalimpl", - "liblog", - ], - fuzz_config: { - componentid: 27441, - cc: [ - "mylesgw@google.com", - ], - }, -} - -filegroup { - name: "manifest_android.hardware.bluetooth-service.default.xml", - srcs: ["bluetooth-service-default.xml"], -} diff --git a/bluetooth/BluetoothHci.cpp b/bluetooth/BluetoothHci.cpp index a247cb0..67ae19c 100644 --- a/bluetooth/BluetoothHci.cpp +++ b/bluetooth/BluetoothHci.cpp @@ -1,5 +1,6 @@ /* - * Copyright 2022 The Android Open Source Project + * Copyright (C) 2022 The Android Open Source Project + * Copyright (C) 2024 KonstaKANG * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +15,7 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.bluetooth.service.default" +#define LOG_TAG "android.hardware.bluetooth.service.rpi" #include "BluetoothHci.h" diff --git a/bluetooth/BluetoothHci.h b/bluetooth/BluetoothHci.h index 477cc5c..2050555 100644 --- a/bluetooth/BluetoothHci.h +++ b/bluetooth/BluetoothHci.h @@ -1,5 +1,6 @@ /* - * Copyright 2022 The Android Open Source Project + * Copyright (C) 2022 The Android Open Source Project + * Copyright (C) 2024 KonstaKANG * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/bluetooth/bluetooth-service-default.rc b/bluetooth/bluetooth-service-rpi.rc similarity index 88% rename from bluetooth/bluetooth-service-default.rc rename to bluetooth/bluetooth-service-rpi.rc index dc78698..fdb1f85 100644 --- a/bluetooth/bluetooth-service-default.rc +++ b/bluetooth/bluetooth-service-rpi.rc @@ -1,4 +1,4 @@ -service vendor.bluetooth-default /vendor/bin/hw/android.hardware.bluetooth-service.default +service vendor.bluetooth-default /vendor/bin/hw/android.hardware.bluetooth-service.rpi class hal capabilities BLOCK_SUSPEND NET_ADMIN SYS_NICE user bluetooth diff --git a/bluetooth/bluetooth-service-default.xml b/bluetooth/bluetooth-service-rpi.xml similarity index 100% rename from bluetooth/bluetooth-service-default.xml rename to bluetooth/bluetooth-service-rpi.xml diff --git a/bluetooth/net_bluetooth_mgmt.cpp b/bluetooth/net_bluetooth_mgmt.cpp index 24693ef..a26ef0c 100644 --- a/bluetooth/net_bluetooth_mgmt.cpp +++ b/bluetooth/net_bluetooth_mgmt.cpp @@ -1,5 +1,6 @@ /* - * Copyright 2022 The Android Open Source Project + * Copyright (C) 2022 The Android Open Source Project + * Copyright (C) 2024 KonstaKANG * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +15,7 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.bluetooth.service.default" +#define LOG_TAG "android.hardware.bluetooth.service.rpi" #include "net_bluetooth_mgmt.h" diff --git a/bluetooth/net_bluetooth_mgmt.h b/bluetooth/net_bluetooth_mgmt.h index 5c473f2..23fb57a 100644 --- a/bluetooth/net_bluetooth_mgmt.h +++ b/bluetooth/net_bluetooth_mgmt.h @@ -1,5 +1,6 @@ /* - * Copyright 2022 The Android Open Source Project + * Copyright (C) 2022 The Android Open Source Project + * Copyright (C) 2024 KonstaKANG * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/bluetooth/service.cpp b/bluetooth/service.cpp index ef4b884..06e8dac 100644 --- a/bluetooth/service.cpp +++ b/bluetooth/service.cpp @@ -1,5 +1,6 @@ /* - * Copyright 2022 The Android Open Source Project + * Copyright (C) 2022 The Android Open Source Project + * Copyright (C) 2024 KonstaKANG * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +15,7 @@ * limitations under the License. */ -#define LOG_TAG "aidl.android.hardware.bluetooth.service.default" +#define LOG_TAG "aidl.android.hardware.bluetooth.service.rpi" #include #include