Skip to content

Commit

Permalink
Add top-level default visibility for Bluetooth module
Browse files Browse the repository at this point in the history
Bug: 215008564
Test: manual
Tag: #feature
Ignore-AOSP-First: Some changes only present in internal
Change-Id: I0c12526bdf833b41e8d1282b29640fa9481b6a04
  • Loading branch information
Etienne Ruffieux committed Mar 6, 2022
1 parent 37c2637 commit 917abc3
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package {
default_visibility: [":__subpackages__"],
default_applicable_licenses: ["system_bt_license"],
}

Expand Down
4 changes: 4 additions & 0 deletions system/binder/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions system/btcore/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ cc_defaults {

cc_library_static {
name: "libbtcore",
visibility:[
"//packages/apps/Test/connectivity/sl4n",
"//packages/modules/Bluetooth:__subpackages__",
],
defaults: ["libbtcore_defaults"],
}

Expand Down
5 changes: 5 additions & 0 deletions system/include/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions system/main/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
4 changes: 4 additions & 0 deletions system/osi/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions system/service/common/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down
8 changes: 6 additions & 2 deletions system/test/rootcanal/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
"[email protected]",
Expand Down Expand Up @@ -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: [
"[email protected]",
Expand Down
2 changes: 2 additions & 0 deletions system/types/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package {

cc_library_headers {
name: "libbluetooth-types-header",
visibility:["//visibility:public"],
export_include_dirs: ["./"],
vendor_available: true,
host_supported: true,
Expand All @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions system/vendor_libs/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 917abc3

Please sign in to comment.