diff --git a/Android.bp b/Android.bp index 2b49380612f..521a5628650 100644 --- a/Android.bp +++ b/Android.bp @@ -1,4 +1,5 @@ package { + default_visibility: [":__subpackages__"], default_applicable_licenses: ["system_bt_license"], } diff --git a/system/binder/Android.bp b/system/binder/Android.bp index ff18409fd43..f11a001acda 100644 --- a/system/binder/Android.bp +++ b/system/binder/Android.bp @@ -10,6 +10,10 @@ package { // AIDL interface between libbluetooth-binder and framework.jar filegroup { name: "libbluetooth-binder-aidl", + visibility: [ + "//frameworks/base", + "//packages/modules/Bluetooth:__subpackages__", + ], srcs: [ ":framework-bluetooth-updatable-exported-aidl-sources", ":modules-utils-synchronous-result-receiver-aidl", diff --git a/system/btcore/Android.bp b/system/btcore/Android.bp index 371af6fc3bd..f4b20a76ed7 100644 --- a/system/btcore/Android.bp +++ b/system/btcore/Android.bp @@ -41,6 +41,10 @@ cc_defaults { cc_library_static { name: "libbtcore", + visibility:[ + "//packages/apps/Test/connectivity/sl4n", + "//packages/modules/Bluetooth:__subpackages__", + ], defaults: ["libbtcore_defaults"], } diff --git a/system/include/Android.bp b/system/include/Android.bp index 7dd3db2e670..8bb2b7c3b6b 100644 --- a/system/include/Android.bp +++ b/system/include/Android.bp @@ -30,6 +30,11 @@ cc_library_headers { cc_library_headers { name: "libbluetooth_headers", defaults: ["libchrome_support_defaults"], + visibility:[ + "//packages/apps/Test/connectivity/sl4n", + "//packages/modules/Bluetooth:__subpackages__", + "//vendor:__subpackages__", + ], header_libs: [ "avrcp_headers", "libbluetooth-types-header", diff --git a/system/main/Android.bp b/system/main/Android.bp index 812340d79bf..defe0e00ef1 100644 --- a/system/main/Android.bp +++ b/system/main/Android.bp @@ -63,6 +63,11 @@ cc_library_static { cc_library_shared { name: "libbluetooth", + visibility: [ + "//cts/hostsidetests:__subpackages__", + "//packages/modules/Bluetooth:__subpackages__", + "//vendor:__subpackages__", + ], defaults: ["fluoride_defaults"], header_libs: ["libbluetooth_headers"], export_header_lib_headers: ["libbluetooth_headers"], diff --git a/system/osi/Android.bp b/system/osi/Android.bp index 47a2b296d09..7b175b742fb 100644 --- a/system/osi/Android.bp +++ b/system/osi/Android.bp @@ -55,6 +55,10 @@ filegroup { // libosi static library for target cc_library_static { name: "libosi", + visibility:[ + "//packages/apps/Test/connectivity/sl4n", + "//packages/modules/Bluetooth:__subpackages__", + ], defaults: ["fluoride_osi_defaults"], // TODO(mcchou): Remove socket_utils sources after platform specific // dependencies are abstracted. diff --git a/system/service/common/Android.bp b/system/service/common/Android.bp index 963dcd44f15..b61e4ffba7d 100644 --- a/system/service/common/Android.bp +++ b/system/service/common/Android.bp @@ -44,6 +44,10 @@ cc_library_static { // Bluetooth Binder shared library cc_library_static { name: "libbluetooth-binder-common", + visibility:[ + "//packages/apps/Test/connectivity/sl4n", + "//packages/modules/Bluetooth:__subpackages__", + ], defaults: ["fluoride_defaults"], cflags: [ /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/ diff --git a/system/test/rootcanal/Android.bp b/system/test/rootcanal/Android.bp index 5d6700f2737..a6c41d606eb 100644 --- a/system/test/rootcanal/Android.bp +++ b/system/test/rootcanal/Android.bp @@ -31,7 +31,9 @@ cc_binary { "bluetooth_hci.cc", "service.cc", ], - + visibility: [ + "//platform_testing/libraries/sts-common-util/host-side/rootcanal" + ], header_libs: ["libbluetooth_headers"], shared_libs: [ "android.hardware.bluetooth@1.0", @@ -81,7 +83,9 @@ cc_library_shared { srcs: [ "bluetooth_hci.cc", ], - + visibility: [ + "//platform_testing/libraries/sts-common-util/host-side/rootcanal" + ], header_libs: ["libbluetooth_headers"], shared_libs: [ "android.hardware.bluetooth@1.0", diff --git a/system/types/Android.bp b/system/types/Android.bp index 8b9c4efed10..827b596cdc2 100644 --- a/system/types/Android.bp +++ b/system/types/Android.bp @@ -10,6 +10,7 @@ package { cc_library_headers { name: "libbluetooth-types-header", + visibility:["//visibility:public"], export_include_dirs: ["./"], vendor_available: true, host_supported: true, @@ -33,6 +34,7 @@ cc_library_static { /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/ "-fvisibility=default", ], + visibility:["//visibility:public"], host_supported: true, srcs: [ "class_of_device.cc", diff --git a/system/vendor_libs/Android.bp b/system/vendor_libs/Android.bp index 2763e9bf3f9..0719cd61cbd 100644 --- a/system/vendor_libs/Android.bp +++ b/system/vendor_libs/Android.bp @@ -5,6 +5,10 @@ package { // to get the below license kinds: // SPDX-license-identifier-Apache-2.0 default_applicable_licenses: ["system_bt_license"], + default_visibility: [ + "//device:__subpackages__", + "//packages/modules/Bluetooth:__subpackages__", + ], } subdirs = [