aboutsummaryrefslogtreecommitdiff
path: root/service
AgeCommit message (Collapse)Author
2020-08-03Check whether local device is an ATV device to determine whether to showRahul Sabnis
the consent dialog for BLE pairing in JUSTWORKS and ENCRYPTION_ONLY mode Tag: #feature Bug: 157038281 Test: Manual Merged-In: I6d06f5996da71e5a1407e544b0023d82924aa56f Change-Id: I6d06f5996da71e5a1407e544b0023d82924aa56f
2020-05-19NIAP: Add new argument to determine config checksum check result.(2/4)weichinweng
Bug: 148758680 Test: m Change-Id: I07eb90a144e172212c7a1a55ef200111efd297e0 Merged-In: I07eb90a144e172212c7a1a55ef200111efd297e0
2020-05-06service: A2DP source callback to query the preferred codecCheney Ni
In order to apply user's preferred codec while reconnecting, we need a callback method to talk to Bluetooth stack whether the mandatory codec has higher priority than others. This change implements a dummy method in the fluoride service, so is working with the stack. Bug: 134131114 Bug: 147572898 Test: bluetoothtbd_test Change-Id: Ib99cf12eba85450526e22723d1509405469c2ebc Merged-In: Ib99cf12eba85450526e22723d1509405469c2ebc (cherry picked from commit 3254942410f182533675645392d7f72d14bf7543)
2020-03-11BluetoothMetricid: Add metric allocator api in javaChen Chen
Bug: 142563377 Test: Manual atest AdapterServiceTest Change-Id: I46d1c1d5bf0c8beea1f46b1024cbd5ceb9c0b562 Merged-In: I46d1c1d5bf0c8beea1f46b1024cbd5ceb9c0b562 (cherry picked from commit 35292e66ecf1508ee64ef76ae297245fb157ff54)
2020-02-13GattServer: Check invalid offsetHansong Zhang
Test: manual Bug: 143231677 Change-Id: I0ca22e7c60292d61c758120c1cd67f6e6edd8ae8
2019-12-17A2DP: Apply codec offloading preference for hybrid modeCheney Ni
Bug: 143922003 Test: manually Change-Id: I3d575cb654c8325b84047426bd7890fb9073314f
2019-10-10[system][bt] fix -Wdangling-gslNick Desaulniers
BtAddrString() returns a std::string. It's not safe to chain a call to c_str() as otherwise the returned std::string is a temporary, and the expression evaluates to an immediately dangling pointer. Bug: 139945549 Test: mm Change-Id: I30972458abcc563b24ee0d80b289c3efd6c3e04d Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-10[system][bt] fix -Wreorder-init-listNick Desaulniers
C++20 will require members in a designated initializer to be in order unlike C99. Bug: 139945549 Test: mm Change-Id: I62dd309d5749c74c18e4291e7d1cef1f3587bf41 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-05-28Merge changes I42c47d98,If38ad50d am: 558c5114b6Colin Cross
am: 9771880d8e Change-Id: Ie780be4bbd91131163721f33febf01fe08a8904d
2019-05-23bpfmt -w $(find . -name Android.bp)Colin Cross
Test: none Change-Id: If38ad50d848c9e40f07c6598272a354312d9efea
2019-05-15NIAP: Add a new argument to determine single user mode status.Martin Brabham
am: 1a88ace397 Change-Id: Ie2866d3a9a83a766fed52e2974fbfd08306536ef
2019-05-16NIAP: Add a new argument to determine single user mode status.Martin Brabham
This is being used to section off the feature to single user mode devices as provisioned devices requiring compliance will be single user mode only. This is a stop-gap waiting on a vendor code fix. RE keystore (qseecom) problems: b/129759834 Bug: b/117993149 Test: atest net_test_bluetooth Change-Id: I4fb3f4e663a051db8f8ba12901a20fa18ebf197e
2019-04-05Modernise code to use override specifierYi Kong
Generated by clang-tidy. Test: m checkbuild Change-Id: Icba58009f6db2a0e9e1360326b0b66fc10d04a5a
2019-03-14Use PLOG rather than LOG strerror(errno).Elliott Hughes
Test: builds Change-Id: I75c3311ce00fccc79b8efc198ce69ffed96e805a
2018-12-12Fix performance-for-range-copy warningsChih-Hung Hsieh
Bug: 30413223 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance* Change-Id: I7d5537c24c39d5c42ac17c8a67646e4b9321d6bb
2018-11-29Metrics: Add Bluetooth address obfuscatorJack He
* Add an address obfuscator that takes a 256-bit randomly generated salt and hashes a Bluetooth MAC address using HMAC-SHA256 algorithm * The salt is generated per Android device during the first time Fluoride native layer is initialized after a connectivity reset * The output of the above operation is an unique identifier for a Bluetooth device on the same Android device, but yet remains anonymous across different Android devices. * Add a logging method loghex(std::array) that allows dumping integral arrays into a hex string * Add more error logging to btif_config_get_bin() so that we know why it fails in the future * Change mutex in btif_config to recursive_mutex to avoid deadlock when calling btif_config API functions with API function Bug: 112969790 Test: mm -j40, bluetooth_test_common Change-Id: I11f01cc82fe805c97fd7c86ad83b3d324ee5af53
2018-10-24service: don't use android::String16 in platform-independent codeJakub Pawlowski
Test: compile on linux with ninja Change-Id: Iac421b43a5516418a33b8c804cfca4c777363b27
2018-10-23Partial fix for linux buildJakub Pawlowski
Test: build with ninja on Linux Change-Id: Ibb5bdde117732556b5b7f0fa6fba8a57c2912782
2018-10-13Uprev libchrome to r576279 (1/multiple)Jakub Pawlowski
This patch brings the latest and greatest features of libchrome to android. It contains ~2600 patches. Reason for uprev: libbluetooth want to use some of the most recent features avaliable. Test: libchrome_test Change-Id: I5f8d5931b404767d3b86cb3bd8df2a05dd67a768 Merged-In: I5f8d5931b404767d3b86cb3bd8df2a05dd67a768
2018-09-27Add TEST_MAPPING to system/btJack He
* Add "postsubmit" test group to TEST_MAPPING in system/bt * Developer can run tests mannually in system/bt via: system/bt$ atest :postsubmit * Remove legacy configuration files spread across system/bt * Created unified configuration file system/bt/AndroidTestTemplate.xml and add it to the default build config so that developers don't have to configure it Bug: 113359343 Test: atest :postsubmit Change-Id: I0fdd55b47ef176b5c4ce3d2cd217ffa67cf9bc23
2018-09-17Suppress implicit-fallthrough warnings.Chih-Hung Hsieh
Add FALLTHROUGH_INTENDED for clang compiler. Bug: 112564944 Test: build with global -Wimplicit-fallthrough. Change-Id: Iedf7e46445101a5e3358473e1200212d67cf58d1
2018-08-29Implement A2DP source and AVRCP target binder serversandroid-o-mr1-iot-release-1.0.4Bailey Forrest
Bug: 64231556 Test: On device. Change-Id: I57136d5550e8e52626a1e7eb26b7d8c02cd94eb5
2018-08-24[bluetoothtb] Fix bug processing BT_PROPERTY_UUIDSBailey Forrest
BT_PROPERTY_UUIDS returns an array of UUID objects Bug: None Test: Manual Change-Id: I9ace472b8bddb5823dc7309528d94faba3d0dfe2
2018-08-17Implement A2DP sink and AVRCP controller binder serverBailey Forrest
Also added bonded device management because this is needed for A2DP to work with most devices. Bug: 32657860 Test: Run on device, modified tests pass. Change-Id: I862e41b6594b7cec9f61094d300577574cc8bbc6
2018-07-24Swap order of registered/status in RegisterForNotificationCallbackBailey Forrest
It's confusing how the order is inconsistent with the one defined in hardware/libhardware/include/hardware/bt_gatt_client.h Test: Build. Right now no code uses these functions. Change-Id: I04b93ba74555455fd981a3809ea3e0bfffca4696
2018-05-25Linux build fixJakub Pawlowski
Test: compile on linux Change-Id: I831df72da8bdec17c4d9c87ebdfb333024eb964c
2018-03-16Implement the JNI layer for the AVRCP Service (2/3)Ajay Panicker
Allows the AVRCP Service Interface to be retrieved via bt_interface_t. Bug: 68854188 Test: Compile Change-Id: I0d9464ea19d3bd382d07134bff057a5515501b95
2018-02-17OSI: Protect cutils/properties.h from direct callsMyles Watson
Bug: None Test: compile, no calls to property_get outside of libosi change PROPERTY_VALUE_MAX in osi/include/properties.h -> doesn't compile Change-Id: I18c7b861782b1df4878da032ae3f0340dffdecab
2018-02-12Remove libbluetooth-system requirement.Steven Moreland
This module doesn't exist and it being missing was silently ignored. Bug: 7456955 Test: no longer receive an error for this. Change-Id: Ib84b592d25e19b2c6b0d20466015553fe57f5bf8
2018-02-01Metrics: Dump native metrics to Java as std:stringJack He
* Dump metrics to Java layer as std::string instead of going through a file descriptor so that Java layer can process metrics data directly * Add new method dumpMetrics(std::string*) Bug: 33693818 Test: adb shell dumpsys bluetooth_manager --proto-bin SL4A metrics tests: BtMetricsTest, BtFunhausMetricsTest Change-Id: I67883c1371862d7e4ff33cec01d710d2d8f274c9
2018-01-31BUILD: Disable build for mac-host targetJack He
* Move disable darwin (mac) options to "fluoride_defaults". * mac-host target is disabled across fluoride, but developer can still build for non-mac targets on a mac host. * Remove vendor_libs/Android.mk that is no longer used. Bug: 72618679 Test: make Change-Id: Ibad9fad3df169e9c4e418a4511c42066fcb10fdc
2018-01-29Drops unittest build on Mac host.Hidehiko Abe
Bug: 72618679 Test: Built on Mac. Change-Id: If6e2f8cf39cd80e80a419fbbed0ce34931ede915
2018-01-09Disable CFI verification for unit tests that are using gtest+gmockPavlin Radoslavov
Apparently, the CFI verification crashes unit tests that are using gtest+gmock. Interestingly, those tests succeed for 32-bit binaries, and fail for 64-bit binaries. Bug: 71739588 Test: Running the 64-bit version of the unit tests in test/run_unit_tests.sh Change-Id: Id1f6b3667b3f9eabb0719e65aea18c6950de63a8
2018-01-03Advertising Filtering: send all filters in one batch (2/2)Jakub Pawlowski
Bug: 67371480 Test: sl4a FilteringTest Change-Id: I93595b5ed4e7cf25cdb6a8b1f9413a7f05e61774
2017-12-18bt: Update libchrome APIS to r456626.Hidehiko Abe
The new libchrome has been ported from Chromium and some APIs have changed. Make necessary changes at call sites. Test: Build. Change-Id: I4c904a9e8b76f1ee72e14d62740cb0d88963b270 Merged-In: I0cc2cf8521caf5f6f69346bb3ce3dc1c59b95cc6
2017-10-23Make copyright headers consistent with Google template; remove "(C)"Jakub Pawlowski
Test: Comment changes only; still compiles... Change-Id: Id699a8170112f06e4a2c9f2e0f0834d1817ace4e
2017-10-19hw/bluetooth.default.so -> libbluetooth.so (1/2)Jakub Pawlowski
Also rename the build goal for both the library and headers. Bug: 67853426 Test: run Bluetooth Merged-In: Iaffeebc1d3f2761e13f6d66d4e855dc342603054 Change-Id: Iaffeebc1d3f2761e13f6d66d4e855dc342603054 (cherry picked from commit 842ff8ed7f5b00d5f6da9d975f37e65c41bb8ebc)
2017-10-19Move Bluetooth headers to system/bt (1/3)Jakub Pawlowski
Bug: 67853426 Test: run Bluetooth Change-Id: I75748d29a35d10d377d39e0441116dbfd04c82e9
2017-10-17Remove hw_module_t dependency in Bluetooth (1/3)Jakub Pawlowski
Bug: 67853426 Test: run Bluetooth Merged-In: Ia3808552137d1f770f2c0305aaa01181f383d064 Change-Id: Ia3808552137d1f770f2c0305aaa01181f383d064
2017-10-02Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]Dan Willemsen
In the future, target.linux will apply to all targets running a linux kernel (android, linux_glibc, linux_bionic). So move all current users to the specific linux_glibc. There will be another cleanup pass later that will move some instances back to target.linux if the properties should be shared with target.android and target.linux_bionic, but target.linux needs to be removed first. Test: out/soong/build.ninja identical before/after Change-Id: Iadc1ba324e03fd2b1b52bf471ffa2a71e0ec3e61 Exempt-From-Owner-Approval: build system cleanup
2017-09-28Remove default librariesDan Willemsen
libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on Linux. Test: m host Change-Id: Ie87f6ff4290d18e099e1be92093b86f743296563 Exempt-From-Owner-Approval: build system cleanup
2017-09-28Fix Linux buildJack He
* UUID source files * L2CAP UCD source files Test: build on linux Change-Id: Iba6d8d082612c62e5a8d552140c86ed242da0e36
2017-09-25Use one type for UUID (1/5)Jakub Pawlowski
Currently, we have few different representations for UUID in stack: tBT_UUID, tSDP_UUID, bt_uuid_t, bluetooth:UUID, or uint8_t*. Additionally, tBT_UUID and bt_uuid_t are used to hold UUID as 128bit as Little Endian or Big Endian, depending on which part of stack (GATT or SDP) is using it. This patch is creating one type, bluetooth::Uuid, that will replace all other types. Bug: 66912853 Test: all sl4a tests for GATT and RFCOMM Merged-In: Ia42d3233146db0488728ed6f878f99b368fe8838 Change-Id: Ia42d3233146db0488728ed6f878f99b368fe8838
2017-09-20Get rid of libhardware dependency in native daemonJakub Pawlowski
Test: compilation test Bug: 66187274 Change-Id: I97ee33a55315f44dc03083d1a8da9a38d5619725
2017-08-17Cleanup RawAddress usageJakub Pawlowski
Use RawAddress::kLength instead of sizeof(RawAddress). When copying value using memcpy, use "->address" instead of direct instance address. Bug: 64726342 Change-Id: Iac7e5674f7e32b53162ab734c2251e65e9d4554c
2017-08-15Fix errors in handling RawAddressesJack He
* In change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6 memcmp(a, b, LEN) != 0 should be translated to A != B * memcpy should not be applied to RawAddress objects. Assignment operator should be used instead. * memset should not be applied to RawAddress objects. Assignment to RawAddress::kEmpty should be used. * Fixed a crash in GATT Bug: 64316340 Test: Unit test, pair with device and transmit Change-Id: Iceefab821c1d45a88194d87a43a192afa5f263fd
2017-07-26Revert "bt: Update libchrome APIS to r456626."Luis Hector Chavez
This reverts commit 014890b74878022db7d23be47db179ba06e01856. Reason for revert: Broke the mac_sdk Exempt-From-Owner-Approval: Fixing mac_sdk Change-Id: I11652839faf8430a7ee6ad64af0a7bd6985478e8
2017-07-25bt: Update libchrome APIS to r456626.Jay Civelli
The new libchrome has been ported from Chromium and some APIs have changed. Make necessary changes at call sites. Change-Id: If5ea3659905f485fd0513c75e9d4f7c99b390c16
2017-07-14Linux build fixJakub Pawlowski
Test: build on linux using ninja Change-Id: I3b0102814433ca88611fbc863271fe065d443c68
2017-07-10GATT: Expose opportunistic client API to JavaJack He
* Opportunistic GATT connection allows system service to subscribe to characteristic notifications without holding the BLE connection * Exposing this flag to Java allows Android applications to use it Bug: 35874078 Test: make, test on Android App Change-Id: Ic470acd63bf45d1c33696abed1e93b30746fb7a2