Commit Graph

516 Commits

Author SHA1 Message Date
Ajay Panicker
447ac4b31d Merge "[DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed" into lmp-mr1-dev 2016-09-21 21:08:10 +00:00
Ajay Panicker
bb9b38b957 [DO NOT MERGE] Fix setPairingConfirmation permissions issue (2/2)
setPairingConfirmation was set to only require BLUETOOTH_ADMIN
permission which shouldn't be able to set the confirmation itself.

This is restricted to BLUETOOTH_PRIVILEGED permission.

Bug: 29043989
Change-Id: Iddc935f0b02f5ff56e930914b4b664377e786184
2016-09-20 23:47:09 +00:00
Ajay Panicker
85bc33a8f4 [DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed
Bug: 28672558
Change-Id: I4bc14bd7f098e34012c2ae1eeba2d439145901f0
2016-09-14 19:17:49 +00:00
Andre Eisenbach
455502b750 Merge "Add API to check if a Bluetooth connection is encrypted (1/2)" into lmp-mr1-dev 2015-02-10 00:21:43 +00:00
Andre Eisenbach
2b8696e3a9 Add API to check if a Bluetooth connection is encrypted (1/2)
Bug: 19186961
Change-Id: I24656a07ee23ebfe067a9dfb9c1bc4041c782d8c
2015-02-09 11:31:06 -08:00
Matthew Xie
60675b2273 Separate the protection of mProxyServiceStateCallbacks from that of mService
The overuse of mManagerCallback caused a deaklock.
Bug: 19264190

Change-Id: Iff20019ff0c99bb5f36435feb15e43e280a8e102
2015-02-06 14:13:56 -08:00
Prerepa Viswanadham
e77adabeaf Don't compute flags length for scan response
Bug 19041626

Change-Id: I7d8aa12e133477fc60d12b474f57313961021975
2015-01-23 17:51:43 +00:00
Benjamin Franz
c88b6bdcfa Don't send the onServiceDisconnected callback after close.
Bug: 18667402
Change-Id: Ia029fd861d643f6646fb124d76ca2a1d2a1a695a
2014-12-16 15:33:03 +00:00
Andre Eisenbach
0fd06a19bd Prevent NullPointerException in getStringValue if no value is set
Bug: 18686365
Change-Id: I5f5d07ef49500e0d8118ba04aaf373ae4514f034
2014-12-09 16:42:14 -08:00
Justin Harrison
4a9cecb1f0 Merge "Add UUID for Pbap client" into lmp-mr1-dev 2014-12-05 19:41:55 +00:00
Benjamin Franz
fb967585cc Merge "Change the routing path of bluetooth headset connections." into lmp-mr1-dev 2014-12-05 12:04:03 +00:00
Prerepa Viswanadham
ff5e5db319 Fix BT crash due to unset value for BluetoothGattDescriptor from API user
Validate writeDescriptor and writeCharacteristic methods at API invocation
for non null initialisation.

Bug 18395071

Change-Id: I411a57b77981310d8db1f98c67e03b4327c93339
2014-12-04 18:30:03 +00:00
Benjamin Franz
e8b98925d0 Change the routing path of bluetooth headset connections.
The HeadsetService is now bound directly by the BluetoothManagerService.
The IBinder object related to the HeadsetService is then given back to
the BluetoothHeadset and to the client app. This change makes the
HeadsetService available for managed profile clients.

Bug: 16968338
Change-Id: I016d1837e4f987c0fab1fc2c64cb06eb91b24d87
2014-12-04 16:57:25 +00:00
Andre Eisenbach
16bf846990 Add server-side callback for change in MTU (4/4)
When a client requests to update the LE transport MTU, the server
currently does not get notified and can therefor not properly size
notifications appropriate to the current MTU.

Bug: 18388114
Change-Id: I515bfc2cc9846490d57de71860f41ea9a61fa243
2014-11-26 12:58:44 -08:00
Matthew Xie
6862361b50 Add UUID for Pbap client
Bug: 18140961
Change-Id: I9cbeb7129b1d30aa7a195ed83821d4a5634283ed
2014-11-20 21:53:26 -08:00
Tom Turney
29230ceab9 Feature request: Increasing advertise data size on
non-connectable adv.
When the advertisement is non-connectable, give back the
bytes to the advertiser where the adv flags would have been.
This increases the non-connectable advertisement's advertise
data from 24 to 27 bytes.

Bug:18359570
Change-Id: Ia3cc48dca50cc3c51095ee92a489f143f6d350b1
2014-11-15 02:25:05 +00:00
Mike Lockwood
95c05a590f Merge "Add dumpsys support for bluetooth" into lmp-mr1-dev 2014-11-08 02:15:28 +00:00
Andre Eisenbach
178d3b54cd Fix crash during Bluetooth on/off stress test
Bug: 18106938
Change-Id: Icdeb736d89d5926264f2043455ccbc3760fd5d29
2014-10-29 12:13:38 -07:00
Mike Lockwood
726d4de780 Add dumpsys support for bluetooth
Bug: 18159457
Change-Id: I8d3f7084a7b089c111fd622ff526630bfdfa7300
2014-10-28 14:06:28 -07:00
Wei Wang
020bd7b861 Remove spammy log information for BLE scan.
Bug:17574681
Change-Id: Ic5761ad7262200f38f2b67659c37f8a3f01d80d5
2014-10-18 00:29:57 +00:00
Prerepa Viswanadham
56302744c4 am 248edc3e: Update javadoc comments for getBluetoothLeAdvertiser()
* commit '248edc3e969217aec1fcce7f324cbae6c46da0a3':
  Update javadoc comments for getBluetoothLeAdvertiser()
2014-10-16 16:11:26 +00:00
Prerepa Viswanadham
248edc3e96 Update javadoc comments for getBluetoothLeAdvertiser()
To clarify that BluetoothLeAdvertiser object will return null
when BT is off OR if the hw doesn't support these capabilities

bug: 18006072
Change-Id: I635d7971711a3cae7c58f7a0636faf9a03f19970
2014-10-16 16:06:44 +00:00
Wei Wang
35cd4c853f Add support of advertising through standard instance.(1/4)
Use config overlay to check whether peripheral mode is supported.

Bug: 17552672
Change-Id: I1081bc84da9fe033426f82ece2ec74c2d663e3aa
2014-10-09 18:01:39 +00:00
Prerepa Viswanadham
f0b56a5a7f Remove remanents of onConnectionCongested in framwork
Bug:17289507
Change-Id: Ia28c39822141edd0e4dc3f623b8c2f280fc5f943
2014-09-24 22:15:08 +00:00
Edward Jee
1bbfcc2fdc Merge "Adds APIs for Bluetooth PBAP and MAP access permission." into lmp-dev 2014-09-16 01:19:19 +00:00
Prerepa Viswanadham
ba4f57a1c6 Remove onConnectionCongested callback
Bug:17289507

Change-Id: I49fd99d320084c618dcec756b832fb3b6a6aec51
2014-09-11 22:29:27 +00:00
Edward Jee
8dd30aadaf Adds APIs for Bluetooth PBAP and MAP access permission.
Currently, users' preference in phonebook and call history or message
access per each Bluetooth-paired device is stored in Settings application's
shared preferences.

However, some privileged applications other than Settings need to access
such data. So we decided to migrate the data from Settings application's
shared preferences to Bluetooth application's.

Bug: 17158953
Change-Id: I3771f03eaea3f57cf60d93ab9fd41c9eb3e1e99c
2014-09-09 15:10:01 -07:00
Wei Wang
6550557f99 Merge "Unregister app when advertise failed after registration." into lmp-dev 2014-09-05 18:49:27 +00:00
Matthew Xie
726652e9d3 Close the base socket when bindListen fails
Bug: 10773872
Change-Id: I0a72b2eb65055fa1959070d2dc32d40a573bd6f2
2014-09-03 19:25:39 +00:00
Wei Wang
833559d9f3 Unregister app when advertise failed after registration.
Also moved bluetooth state check to common utils class.

Bug:17364837
Change-Id: I25ff7afae723d47f701236d5a68eab8015de9bbb
2014-09-02 18:32:37 -07:00
Wei Wang
b1e066bc27 Merge "Fix API council review comments. Also hide certain APIs(1/3)." into lmp-dev 2014-08-24 23:00:20 +00:00
Andre Eisenbach
491cb3f578 Merge "LE: Rename new MTU and connection paramter update APIs" into lmp-dev 2014-08-21 17:56:25 +00:00
Wei Wang
7cb10ac392 Merge "Fix threading issue for advertising." into lmp-dev 2014-08-21 04:10:51 +00:00
Andre Eisenbach
4072da041d LE: Rename new MTU and connection paramter update APIs
bug 17005342

Change-Id: I23151e1e92fe86896fc2883f81aef82084bb4215
2014-08-20 02:03:57 +00:00
Wei Wang
9a974be631 Fix threading issue for advertising.
Post callback to main thread to execute. In general we should avoid
running app's callback method from binder thread as the callback method
may block.
Also removed callback from advertisers on stop advertising callback.
This fixes the issue of not being able to restart adv for limited
advertising.

Bug: 17045567

Change-Id: I56cd2bdf4b1ad120a0358fa4065ad77be4bff144
2014-08-19 10:40:36 -07:00
Wei Wang
b661bb7958 Fix race condition for BluetoothLeScanner.
Root cause of the issue:
Client registeration was done on caller's thread, while
onClientRegistered was called from binder thread. There is a slight
chance that onClientRegistered was called before registerClient
returned, causing a premature notifyAll before wait was called.

By forcing acquiring the same lock now it's guaranteed wait would
happen before onClientRegistered callback was executed.

Bug: 16707401
Change-Id: Ic60adec475085741d14ecd2d2bb462246f88da58
2014-08-19 10:46:52 -07:00
Wei Wang
9960b57653 Fix API council review comments. Also hide certain APIs(1/3).
b/17006825.

Change-Id: Iee64b11920152e0ab3da54decf37fa4a83be5dc7
2014-08-15 14:07:14 -07:00
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