Commit Graph

479 Commits

Author SHA1 Message Date
Prerepa Viswanadham
621085e50f Protect from malformed advt with invalid manf_id/data combo
Bug: 16979645
Change-Id: Ie7ea00ed20cbad1120c7582bb2bafd44b4295052
2014-08-14 05:33:11 +00:00
Prerepa Viswanadham
ee3cc8bf17 Prevent crash in Gatt service due to null pointer in
BluetoothGattCharacteristic from framework

Bug 16899517

Change-Id: Ib30ddefee07c2953f9a7faeb4eaa823feeebdc8f
2014-08-14 05:32:06 +00:00
Wei Wang
ee80922c6a Clean up advertise and scan clients upon bluetooth down.
Fixes b/16528460

This allows Advertiser and Scanner to be reused after bluetooth recycle,
which follows same behavior for BluetoothAdapter.

Also prints manufacturer data array for ScanRecord.

Change-Id: I78bca40ac294433782a054bf2a00a775dac02d96
2014-08-13 11:08:48 -07:00
Wei Wang
0d0df3ce25 Add a TLV to support different result storage
Change-Id: Ic20a1720b783508cf85b234950b7fd0c79e9e7c3
2014-08-07 18:57:24 -07:00
Prerepa Viswanadham
d5324e4183 OnLost/OnFound integration - onfound match is done in framework,
whereas hw signal is used to report onlost.

Bug 16733710

Change-Id: I7b177b7afd730341c336818857436c095735b53b
2014-08-07 19:51:59 +00:00
Andre Eisenbach
57210c7a1a Add transport parameter to createBond() function (4/4)
Bug: 14063256
Change-Id: I096248b60752992aa23ce5bfbfc47fda95773db2
2014-08-05 17:01:13 +00:00
Wei Wang
e0d4afb2d4 Add a default impelementation of IBluetoothGattCallback(1/2).
Also cleaned up a few TODOs and fixed bug.
b/16410260 AdvertiseCallback null onSuccess callback

Change-Id: I75a582c03be1e2ef6964c2cbeba42aaaf9f9e17c
2014-08-01 14:34:25 -07:00
Wei Wang
6bf513d32d Revert "Revert "Service data and manufacturer data can be repeated fields.""
This reverts commit 14c797702543bb5ced989565d90abcfa55c7db46.
2014-08-01 11:12:37 -07:00
Sungsoo Lim
67c01a4b6d Revert "Service data and manufacturer data can be repeated fields."
This reverts commit 26dc9b99b17ca9d8ce3632c48e8b6c1450ee53e9.

Change-Id: I1846d0a6491c5b2ba5905411bd98f5d17909b705
2014-08-01 01:24:14 +00:00
Wei Wang
3f7a39063a Service data and manufacturer data can be repeated fields.
b/16635899

Change-Id: I73f1f4effd3f0e38cd427297eb9d22f3ba285d61
2014-07-31 15:43:05 -07:00
Wei Wang
64d2b567c3 Merge "Make scan filter accepts prefix. Add tests." into lmp-dev 2014-07-25 23:01:28 +00:00
Wei Wang
0462468aaf Make scan filter accepts prefix. Add tests.
Change-Id: I714dd6d95ad2bc874dce1106b325762b19159119
2014-07-28 21:46:44 -07:00
Prerepa Viswanadham
f6b3d8ca36 Fix crash in Stopping/Starting BLE advertising after
BluetoothAdapter cycling

Bug 16528460
Change-Id: Iad852bc93d307c5ca5f7e42f24248aa02c105e8a
2014-07-29 21:06:29 +00:00
Andre Eisenbach
d65e8f4b6b LE: Do not invoke callback if retrying read/write operation
When a descriptor read/write operation fails with insufficient
authentication/encryption, it will automatically be tried again with
elevated security requirements. The first (failed) attempt should not be
reported to the application requesting the read/write, since it will get
the 2nd callback once the retry succeeds/fails.

Change-Id: Ia27b91afa63b6f9ffdc597d59c24d29f3d8a1008
2014-07-28 15:48:59 +00:00
Wei Wang
ab2ed62f15 Split manu id and manu data.
b/16407380

Change-Id: I39f6ce0ab4cccadec809f0a4f518f5d2c77a90b7
2014-07-27 23:12:26 -07:00
Wei Wang
ec64dbfbc0 Fix bug of ScanSettings. Add unit test.
b/16318637.

Change-Id: I3fbc1212c1712faa0c29132f3dc9cfc1d58af26b
2014-07-25 10:56:08 -07:00
Wei Wang
c3059ccfb0 Use Scanner for legacy LE scans(1/2).
Also removed different scan methods from IBluetoothGatt and make
BluetoothLeScanner and BluetoothLEAdvertiser singleton.

Change-Id: Ifa2e950b50f100f5507a6dace3bd70db18d7f9ca
2014-07-24 20:26:55 -07:00
Prerepa Viswanadham
5bec5af971 cleanup : delete BLE advertising related hidden state references in Bluetooth Adapter
Change-Id: Ia58a46392157e274f8fc4696e8e25af480eb2d2a
2014-07-24 19:28:12 +00:00
Wei Wang
0e81ca2543 Move AdvertiseData length check to BluetoothAdvertiser.
This will keep AdvertiseData simple and avoid coupling with
BluetoothAdapter.

Change-Id: I3609652bdea1c6e757bac7d2dada7f8ddf20a5e3
2014-07-23 20:39:12 -07:00
Prerepa Viswanadham
8caac741a0 Bug 15564216: Report Bluetooth tx/rx/idle activity info and energy reporting
Change-Id: I66fd83d8d59fbd93dec8886dfd313a81575e38a5
2014-07-23 18:54:46 +00:00
Wei Wang
03259472b1 Fix parcel issues with empty service uuid. Added tests.
b/16490816

Change-Id: If26a4731f22e83df4f5ded2ad76901de6c49a010
2014-07-23 10:23:10 -07:00
Wei Wang
685c175890 More API modification of BLE APIs (1/2).
Changed include:

1) Add serviceDataUuid to filter so it matches sanRecord and
AdvertiseData.
2) Add raw bytes to ScanRecord and make ScanResult take a ScanRecord
instead of raw bytes.
3) Change from setServiceUuid(List) to addServiceUuid(ParcelUuid).
4) Added include device name
5) Removed service not registered and added ADVERTISE_DATA_TOO_LARGE.
6) Fixed a few comments.

Change-Id: Ibbe07183b1293835c4a84728d1cd2d61e5d627d3
2014-07-18 18:31:00 -07:00
Andre Eisenbach
55d19e495e Reduce GATT logging output
Change-Id: Iefdf101ac849e45bf50c55ce5999364f5fbd24a4
2014-07-18 14:38:36 -07:00
Andre Eisenbach
6ce4db0acf LE: Add connection parameter update request API (4/4)
Change-Id: Ifb531a1b7ab05888817b96fcc89f85e17df7ffe2
2014-07-18 12:13:46 -07:00
Wei Wang
890b46a0d5 Remove MR2 BLE Advertising hidden API from L codebase (1/2).
Change-Id: I78bb8b89de56bddb7422da1d1d4468c88a68ea11
2014-07-14 19:31:49 -07:00
Wei Wang
af74e66e29 Unhide Bluetooth batch APIs. Deprecate BluetoothAdpater scan APIs. (1/2)
Change-Id: Ib0c4ea6c8372a15473269660355fb5ccf4284457
2014-07-11 11:06:10 -07:00
Prerepa Viswanadham
b108a6fef1 Unhide the Bluetooth(BLE) offload capability apis
Change-Id: Ice3f4f5ff4b8318bf6afe7021b253fe9ea4661d3
2014-07-09 21:23:51 +00:00
Prerepa Viswanadham
8f2e74cac2 OnFound and Onlost callback integration
Change-Id: I23473b18484f041c4dd808c85bb92545a77e20c2
2014-07-09 21:07:13 +00:00
Andre Eisenbach
45a0a1a689 LE: Un-hide new congestion control and MTU APIs
Change-Id: I5ce395481620dd7ab611b1ab0eaeb5e29c4f13fa
2014-07-08 17:09:38 -07:00
Prerepa Viswanadham
8e5270fdf5 Tie in BLE hw capabilities with api invocation and support.
Change-Id: Ic1f0b3f156cf2fdde8f04b5c4384e4fd3d79623a
2014-07-08 23:34:49 +00:00
Wei Wang
9fb1791e1a Implement batch scan API
Change-Id: Ibb527280a221fbdd0fc6b805a7527c29079294b4
2014-07-08 00:42:32 -07:00
Prerepa Viswanadham
0c116e1573 Obtain capabilities from chipset for it's support of various features
Change-Id: I01bdb31136be63e4e46fb4e054c902eddc5647ab
2014-07-02 21:24:37 +00:00
Hemant Gupta
8949bfb90c Bluetooth: Support MAP Client role on Bluedroid.
Implementation changes to support MAP client and PBAP client
role on Bluedroid stack.

Change-Id: I1733a67bf5256bd7b181bd5e68e40b476994ebfd
2014-07-01 18:01:27 +00:00
Andre Eisenbach
061cfd0049 LE: Fix GATT server documentation to reflect API updates
Change-Id: I21100dd55a7bf9e85a07742f571d5743bad5ece1
2014-07-01 17:16:11 +00:00
Mudumba Ananth
177d078d90 Add WBS support on Bluedroid (6/6)
Bug 13764086

Change-Id: I7afbddb02fc247d7799ab0fb264a467c7853cb32
2014-06-30 22:44:24 +00:00
Andre Eisenbach
fad6726724 LE: Hide new congestion constant for now
Change-Id: I86455be16bc3356a1ad24db6d6e6835cb299eb5f
2014-06-27 11:42:19 -07:00
Andre Eisenbach
dadefdad8e LE: Add notification sent and congestion callbacks (3/4)
This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Also made server callbacks "oneway" in the AIDL definition file.

Change-Id: I7fa3324712205c79efce58e5e3df8b80a265a442
2014-06-27 10:31:41 -07:00
Paul Jensen
b5f6bf7ad1 Merge "Convert BluetoothTetheringDataTracker into a NetworkFactory." 2014-06-24 07:59:24 +00:00
Paul Jensen
81c884ee52 Convert BluetoothTetheringDataTracker into a NetworkFactory.
bug:15407087

Change-Id: I0437ca52dedf73e8ec69ac82e46353f6fafc4a42
2014-06-26 09:13:51 -04:00
Ang Li
39e7a54568 Merge "Fix comment for sendData." 2014-06-26 08:19:24 +00:00
Ang Li
707fd39f8b Fix comment for sendData.
Merging kwd commit dfb40d5c51411b0d10ec22a9af283f349d8904d7
Change-Id: I5f3c16f3e99dce8bbb0011af3322ce3e6487d6d9
2014-06-25 13:45:42 -07:00
Mike J. Chen
2975c683bc Fix bug where GATT descriptors weren't being added to right characteristic
When there's more than one characteristic with the same UUID in
a service, the descriptors for the non-zero instanceID characteristics
were being assigned to the zero instanceID one, so descriptor
fetching wouldn't work.  This is particularly bad for HID devices
since separate reports would show up as multiple characteristics
with the same UUID but there'd be no way to identify them
without their descriptor attributes.

Change-Id: I92bb4be34aa941dd3c6750874bef2e8a261ded92
Signed-off-by: Mike J. Chen <mjchen@google.com>
2014-06-24 10:19:45 -07:00
Mike Lockwood
94b59de852 BluetoothAvrcpController: Move AVRCP controller support to new BluetoothProfile subclass
Change-Id: Id988040a7ce623ed68e0349920301ff48db1fbce
2014-06-13 09:06:36 -07:00
Hemant Gupta
3b76a4b2b6 Add Support for AVRCP Controller Feature
- Provide support for AVRCP Controller CAT 1 and CAT 2
    passthrough commands.

Change-Id: Iefbb7fcd6273c49dc8a305b7a25ec6e94c60a5a9
2014-06-13 09:06:36 -07:00
Mike Lockwood
2263dd1ddd BluetoothA2dpSink: Add new BluetoothProfile subclass for A2DP sink
Change-Id: I09d5cb8fdaea4c4828f333949b7c18deffd22722
2014-06-13 09:06:35 -07:00
Mike Lockwood
0b611b5f3b Add BluetoothHeadsetClientCall.toString method
Change-Id: I8a95fda4f67daa09dfefedffec804c06af53ebe0
2014-06-13 09:06:35 -07:00
Mike Lockwood
cf916d3467 Rename BluetoothHandsfreeClient to BluetoothHeadsetClient
This makes our terminology consistent with the existing BluetoothHeadset profile

Also updated arguments to Context.bindService()

Change-Id: I27cc5a6fde256b1f5dccca53a7a15ec8f58691c2
2014-06-13 09:06:35 -07:00
Hemant Gupta
7aca90fcc0 Bluetooth: Add support for HFP Client role.
Implementation changes in frameworks to support
HFP Client role.

Change-Id: Ifb10527cd6c1301297cae4f923b20734af672034
2014-06-13 09:06:35 -07:00
Wei Wang
53fe28b7b6 LE: Add oneway attribute to Gatt callbacks
Adding the 'oneway' attribute to the GattService interface definition
prevents applications from blocking callbacks.

Bug: 15489651
Change-Id: Id7fcf7f95539092f03e5773ca318b5472b55cb4d
2014-06-12 23:48:41 +00:00
Prerepa Viswanadham
58a01d6ab1 Take out startScanWithUuidScanParam as part of refactoring
Change-Id: Icfb9083571e22c0853fc64ad4d09a20cbf754257
2014-06-12 10:39:29 -07:00