Commit Graph

53 Commits

Author SHA1 Message Date
Steven Moreland
3556da3b4a Add include/hardware/*.h symlinks.
These are required to build. Separate CL to preserve blame history.

From running 'update-includes.sh' script here.

Bug: 37280010
Test: boot/build (sanity)
Change-Id: Id9c2dc37f674b27b947a9f823bd38a550d64d31b
2023-06-02 23:01:56 +00:00
Steven Moreland
d783cabd4d Split up headers.
This splits headers into three locations:
include - for backwards compatibility, the global include
include_all - for things system/vendor both use
include_vendor - for things that only vendors use

The goal is to gradually have system things stop referencing
(at least most) of these headers.

Bug: 37280010
Test: build (CL on top adds back in symlinks)

Change-Id: Ibf194276b7faa857e1e7605d7719f4e7d873ecba
2023-06-02 23:01:54 +00:00
Yichun Li
f8028b370d Revert "Delete bluetooth.h"
Revert submission 2517798-remove_bluetooth_h

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_bramble-userdebug&lkgb=10164200&lkbb=10164726&fkbb=10164208

Reverted changes: /q/submissionid:2517798-remove_bluetooth_h

Bug: 10164208
Change-Id: I32d42ce282c82c4435ce071c8aa8969cceae2e68
2023-05-19 00:33:13 +00:00
David Duarte
3552b1c400 Delete bluetooth.h
hardware/bluetooth.h was copied into Bluetooth in https://r.android.com/513838

Change-Id: Ia7388b446bd37b3cbdf8276c8c4d11e8af17640c
2023-05-18 09:12:40 +00:00
Martin Brabham
44e1aaab15 add is_valid to oob data
Bug: 178007935
Test: manual, test app
Tag: #feature
Change-Id: I9ba3639904471a4c34d8f5df753c416e149749c7
2021-06-18 10:18:31 -07:00
Martin Brabham
7094c89e5c Update oob data struct
Bug: 178007935
Test: compiles and runs
Tag: #feature
Change-Id: Ia06b8c65cac45694a3a9f01ca73bf6e0b3010d06
Merged-In: Ia06b8c65cac45694a3a9f01ca73bf6e0b3010d06
2021-03-15 19:29:22 +00:00
Rahul Sabnis
14511f6722 Update the signature of init function to include whether the device is am: 247c646824
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/12308133

Change-Id: I787e5077a29653ecb551f4176fcfa0b2a054f7a5
2020-08-05 21:17:00 +00:00
Rahul Sabnis
247c646824 Update the signature of init function to include whether the device is
an ATV

Bug: 157038281
Test: Manual
Change-Id: I1685c4318c27e8dcca5f7a696fe9e1f8bf594b9d
2020-08-04 14:17:15 -07:00
Jakub Pawlowski
5d5996a069 Remove hw_module_t dependency in Bluetooth (2/3)
Bug: 67853426
Test: run Bluetooth
Change-Id: I0b144544b99a4e7fea74800d3bd44b45f446d02f
2017-10-17 20:02:54 +00:00
Jakub Pawlowski
eab6b6eda9 Use one type for UUID (2/5)
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
Change-Id: Ic9048a6c1f32a16034485b6185f5349e6bac0ff6
2017-09-25 21:24:08 +00:00
Jakub Pawlowski
7a859c0314 Remove unused BT_STACK_TEST_MODULE_ID
Test: compilation
Change-Id: I0aa9edd7e7d15df53bdd729cd4d0f0e424b13eab
2017-09-18 15:18:01 -07:00
Jakub Pawlowski
bec70c64ce Make RawAddress into a class (2/3)
* Add libbluetooth-types - library containing types implementation, that
is common between stystem/bt and packages/apps/Bluetooth. It must be
included in every project using btif interface.
* Put Raw Address implementation into libbluetooth-types
* Unify all "to/from string" helper methods into ToString and FromString
* bd_addr_empty -> RawAddress::kEmpty
* bd_addr_any -> RawAddress::kAny

Also fix leaks in jni str2addr by adding ReleaseStringUTFChars

Test: types_unittest
Change-Id: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716
Merged-In: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716
2017-07-06 22:39:27 +00:00
Jakub Pawlowski
04f10baaee Make RawAddress into a class (2/3)
* Add libbluetooth-types - library containing types implementation, that
is common between stystem/bt and packages/apps/Bluetooth. It must be
included in every project using btif interface.
* Put Raw Address implementation into libbluetooth-types
* Unify all "to/from string" helper methods into ToString and FromString
* bd_addr_empty -> RawAddress::kEmpty
* bd_addr_any -> RawAddress::kAny

Also fix leaks in jni str2addr by adding ReleaseStringUTFChars

Test: types_unittest
Change-Id: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716
2017-07-06 12:01:31 -07:00
Jakub Pawlowski
5a852006a6 Rename bt_bdaddr_t into RawAddress (1/3)
Test: compilation test
Change-Id: I80288013ce1c75538c45949815660cbb66ffed2e
2017-06-28 22:32:03 +00:00
Jakub Pawlowski
db4c12a7f2 Rename bt_bdaddr_t into RawAddress (1/3)
Test: compilation test
Change-Id: I80288013ce1c75538c45949815660cbb66ffed2e
2017-06-27 12:46:25 -07:00
Jack He
9213f5b043 MCAP: Add test interface ID (1/2)
* Some PTS tests requires protocols and profiles to be accessed at stack
  API level
* This CL creates an ID for the MCAP protocol
* An application must be able to reference stack headers in order to use
  such an interface

Bug: 37867299
Test: make, no user visible effect
Change-Id: Ice654321cdeb11f93b1c8fc4a0753fe86bd82a56
2017-05-23 15:56:35 -07:00
Ajay Panicker
6992397ce6 Limit btsnoop file size (1/8)
Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: Ic43600b10435d34a0528e28bd523187a6c311f61
Change-Id: Ic43600b10435d34a0528e28bd523187a6c311f61
2017-04-27 00:04:25 +00:00
Jakub Pawlowski
696f69966c LE Maximum Advertising Data Length (3/4)
Add ability to check maximum advertising data length.

Bug: 30622771
Test: manual
Change-Id: I14a66a906a3f6133eea87c538de854bbfab056f5
2017-03-16 18:28:59 -07:00
Jakub Pawlowski
0a660af26a Bluetooth 5 feature check implementation (2/3)
Wire the new feature check API to actual values received from the
controller.

Test: manual
Bug: 30622771
Change-Id: I76d373b94fd3d4d637ddae637a8424d463286837
2017-03-09 18:19:24 -08:00
Hemant Gupta
7ed5a7f0e6 Bluetooth: Add support for HID Device Role
This patch adds support for HID Device Role in HAL so that jni
layer can communicate wtih Bluedroid Stack when calling HID Device
API's and callbacks.

Bug: 33011576
Change-Id: I591f477ee58924a9003d6e733dcbbc4e8a7d3202
2016-12-27 22:29:56 +00:00
Jakub Pawlowski
d82fbad4aa BLE OOB Pairing - parse address type (2/5)
When address type is not parsed, creating bond to devices not using
random address is impossible.

Bug: 32780409
Test: try pairing with nRF52DK using random address
Change-Id: I1265b6abdefa12dc024d00ecf232f7fc7722d178
2016-11-10 01:06:48 +00:00
Jakub Pawlowski
9caabe1563 Fix an incorrect description of OOB data field
Change-Id: Ia3712d9af9d5521e2a3cc9ecbcf7b37fd0755c9a
2016-09-22 17:10:12 +00:00
Ajay Panicker
d51c01d9fd Add guest mode functionality (3/4)
Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active

Bug: 27410683
Change-Id: Ibededbdb832275db4b6e78af83d26754f8b5a9ec
2016-04-18 16:44:36 -07:00
Andre Eisenbach
f65d1257d3 Bluetooth: Additional status codes for wakelock ops
Add additional status codes to better track wakelock acquisition or
release failures.

Bug: 27721443
Change-Id: I99fb442277dac81df0d84d9a9f7a3340158377a8
2016-03-21 17:23:23 -07:00
Andre Eisenbach
e410940531 Add ability to add interop entries dynamically (1/2)
Add ability and interface for adding dynamic entries to the interop
workaround database.

Bug: 26548845
Change-Id: I17f8cbdf1e63c316aa52903be7ec526c9b1376bb
2016-02-15 17:15:45 -08:00
Marie Janssen
32d45dd020 Add arguments to native dumpsys support
Arguments are passed through in order to support metrics logging and
future support for other dumpsys support in the native daemon.

Change-Id: Icaa75b9f36cca7e2dd2ceb5f94b27dec657d34e4
2016-01-27 17:49:32 +00:00
Adam Lesinski
e2d316d2c9 Add Bluetooth network traffic accounting to HAL API
Introduces a UID traffic struct and includes it in the API
for querying energy usage data.

Also adds the calling UID as a parameter for starting sockets
so that network traffic can be tracked.

Bug:26039657
Change-Id: I9f4a130adc2846467063e7a9a4ea2231af06a80b
2016-01-20 16:47:00 -08:00
Jakub Pawlowski
00202fff5a Add structure for holding Bluetooth OOB data.
Change-Id: I0f59bf6343e519a7da830f57d242f9bdf18fca93
2015-12-30 19:50:03 +00:00
Ajay Panicker
b3759712b0 Implement Bluetooth settings factory reset (4/5)
Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518
Change-Id: I69358db95582ddd0f2f640f76cf0931f797d369b
2015-08-04 15:14:03 -07:00
Casper Bonde
5ccdc518ab SAP: Make it possible to enforce a 16-digit pin code (2/5)
This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I4d43eefa76e8abc1bcfad6dfd9004d8e82168bf4
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
2015-06-09 13:57:53 -07:00
Andre Eisenbach
34ab95a369 Bluetooth native dumpsys logging support (1/5)
Bug: 18508263
Change-Id: Id7b69a6ed7d817a0f048cb8ebf0889c600171926
2015-05-12 15:56:10 +00:00
Satya Calloji
51225020dc LE low power scan feature
LE low power extended scan feature header changes
based on Google spec v0.95

Bug: 20029342
Change-Id: Id1020a4da177d0bc421fdd123c5355a291cc0475
2015-04-17 14:27:17 -07:00
kschulz
9a92a7bff0 L2CAP and SDP Search API for BT profiles (1/2)
Added interface to create SDP records, to allow the upper
layers to set the content of the SDP record, including
both a RCFOMM channel and a l2cap PSM.

Change-Id: I7c47848a10b3d3091afbeadb4de8a8d7ea812288
2015-04-10 16:48:44 -07:00
Satya Calloji
a8b49d3fee OnFound/OnLost feature API changes based on spec v0.90
Bug: 19609671
Change-Id: Id28e188159aa41c940723fb5b12cade0a48e506b
2015-03-27 09:40:52 -07:00
Andre Eisenbach
01206e579c Add transport parameter to createBond() function (1/4)
Change-Id: I8373ace899444c138907aaecc0f067188b0a7d90
2014-08-04 17:22:29 -07:00
Prerepa Viswanadham
378de1a9e0 Incorrect data type. bt_local_le_features_t of wrong size
b/16653133

Change-Id: Icd7a3de6161669f4c54c6042bf80314e72f5f0ff
2014-07-30 23:41:29 +00:00
Satya Calloji
be7f044b64 LE energy info feature
Header changes for energy info feature

Change-Id: Ic341ad9089b444960c36beff726fa9ddb5c901a2
2014-07-23 18:52:50 +00:00
Hemant Gupta
053cccfe14 Bluetooth: Support MAP Client role on Bluedroid.
Implementation of MAP Client (MCE) role on
Bluedroid stack. Include MAP Client Interface ID.

Change-Id: Icdf11b7f09a161e35aa3aa68b9b5fa315e18fd65
2014-07-01 10:36:44 -07:00
Hemant Gupta
4d8645547d [1/2] Bluetooth: Security: Handle authentication rejected error status
Handle authentication rejected error status in failure scenario.

Change-Id: Ibd59d161ee5481ced2cb078a6ee6f4a6b045bcd4
2014-06-29 11:53:55 -07:00
Andre Eisenbach
0d553bc12f LE: Add is_connected() function (1/3)
Change-Id: I1b94ab0c8b0ff2e1026a4f5bbe95dca25be3d104
2014-06-19 11:32:12 -07:00
Mike Lockwood
21e50b1898 Use separate HAL interfaces for A2DP source and sink roles.
Both use the same structs for APIs and callbacks, but now
source and sink mode can operate independently with separate
Bluetooth profile services in the framework.

An extra callback btav_audio_config_callback is used for reporting
audio configuration for A2DP sink role

Change-Id: I6e8172b66ff95e61721d1c35790609b7ae2be030
2014-06-13 09:09:58 -07:00
Mike Lockwood
7da4cb8b6f Move AVRCP controller support to a different HAL interface
This allows us to add a new BluetoothProfile subclass for
the AVRCP controller role independent of the existing AVRCP target support.

Change-Id: I504bbf58a88808d1a884266992ae0c635c62aca1
2014-06-13 09:09:58 -07:00
Mike Lockwood
5735b772ee Merge "Bluetooth: Add support for HFP Client role." 2014-06-12 17:09:07 +00:00
Hemant Gupta
e7737c81e8 Bluetooth: Add support for HFP Client role.
Implementation changes in HAL for HFP Client role.
Include HFP Client Interface ID.

Change-Id: I1117c6a0c53e7e7059e46711f7a26639d2bbaee3
2014-06-12 13:20:32 -07:00
Sharvil Nanavati
3bd8cba787 Add callouts for bluedroid to acquire wake locks and set wake alarms.
Since bluedroid is running outside of system_server, it does not have
the necessary Linux capabilities or filesystem permissions to access
/sys/power/wake_* and /dev/alarm (or any other wake alarm). This change
provides a mechanism by which bluedroid can call back up into Java code
and use the standard Android APIs to get wake locks / wake alarms.

Change-Id: I714fd394224d38da5ff0f82de5559599d522010b

Conflicts:
	include/hardware/bluetooth.h
2014-06-12 14:01:25 -07:00
Ganesh Ganapathi Batta
460343a1b5 Add support for retrieving local LE features via get_adapter_properties
Change-Id: I337614aa96ec08f631667dc4a18b4e5c993a79b1
2014-06-12 01:34:38 +00:00
Matthew Xie
d34c7d3d1a Revert "bt: add interface function to provide wakelock access"
This reverts commit 19f3696f85.
2014-05-23 17:07:19 -07:00
Dmitry Grinberg
19f3696f85 bt: add interface function to provide wakelock access
Change-Id: I7ea173aee49ae7fdfe81a24a9b3666efc1c29ed4
2014-05-22 19:26:25 -07:00
Glenn Kasten
08708c5e1f Fix file permissions
Change-Id: Iffc2941d98ee16796cf3d44dec1cfa376d9362bb
2013-08-20 12:49:27 -07:00
Zhihai Xu
a17b75bb17 Add debug menu to enable btsnoop
bug: 8059358
Change-Id: Ib28ffe12d9b42726a0c12ecb144624862745e9ca
2013-06-10 20:23:45 -07:00