Commit Graph

618 Commits

Author SHA1 Message Date
Bryce Lee
e5d5773f71 Improve logging in BluetoothHeadsetClientCall. am: 3c67873f0a am: 180dd72a9b am: a83d518689
am: 0a8c81a204

* commit '0a8c81a2046753f08c036ec68a15778e0c0dade4':
  Improve logging in BluetoothHeadsetClientCall.
2015-12-09 23:18:52 +00:00
Bryce Lee
3c67873f0a Improve logging in BluetoothHeadsetClientCall.
Bug: 26032099
Change-Id: I497edc9aa4c19cc7159993a899071e7b0c26db63
2015-12-08 11:22:31 -08:00
Neil Fuller
1d4775fbb2 Merge "Add thread safety documentation" 2015-12-04 11:09:53 +00:00
Christine Hallstrom
07c289d183 Merge "Log API calls to createBond(), cancelBondProcess(), removeBond()" into cw-e-dev am: 7fb263c472 am: 67d068b5ec am: 9355a0420e
am: c1a79e7bd2

* commit 'c1a79e7bd2061c025fd88529800db7358c39ed14':
  Log API calls to createBond(), cancelBondProcess(), removeBond()
2015-12-03 21:00:30 +00:00
Christine Hallstrom
044b8f3f03 Log API calls to createBond(), cancelBondProcess(), removeBond()
In an attempt to better be able to debug Bluetooth-related parts of
the system, add info-level logging including calling process and
thread whenever the aforementioned functions are called.

Bug: 25996120
Change-Id: I5a72b2ab929f805ec1c43cc54879ed079a8dfe34
2015-12-03 19:08:17 +00:00
Neil Fuller
bf0dc0fba7 Add thread safety documentation
An upcoming change will remove "synchronized" from the API docs. This change
documents those cases where the guarantees can be determined from code
inspection.

Bug: 25767152
Change-Id: I75083ce01513ed315222304fe3f34190d40748cb
2015-11-26 13:33:48 +00:00
Bryce Lee
cdde7c8868 Merge "Add Bluetooth headset API to allow disabling audio route." into cw-e-dev am: cb8749c903 am: 0fa22022a3 am: e2861471b9 am: 52d93db91d
am: 17ffebf8c8

* commit '17ffebf8c802ccc5ee6db36aad88e560297d6c33':
  Add Bluetooth headset API to allow disabling audio route.
2015-11-17 16:41:39 +00:00
Bryce Lee
0db53d90a0 Add Bluetooth headset API to allow disabling audio route.
This functionality is required by devices which have multiple profiles
using the SCO channel. For example, a device that is both a HFP AG and HF.
In this case, we must explicitly notify the profiles when they can acquire
the channel as they are not aware of each other. A similar change was
previously added to the Bluetooth Headset Client profile.

Bug: 25485578
Change-Id: Ia60cfdd33c2c3c3f185464b24056f8ccb976056d
2015-11-16 08:55:52 -08:00
Bryce Lee
52e52f6f56 Merge "Add ability to set whether audio route is allowed in BluetoothHeadsetClient" into cw-e-dev am: 4636770f0d am: 3b6f9f78cf
am: 698b33ea7f

* commit '698b33ea7f78d200df73ef869d68cfc5ab36e604':
  Add ability to set whether audio route is allowed in BluetoothHeadsetClient
2015-10-29 18:19:14 +00:00
Bryce Lee
bc8654748f Merge "Revert "Declare new interface for headset client bluetooth profile to query."" into cw-e-dev am: 0a80294c81 am: 2adf45bee0
am: 8faa19c826

* commit '8faa19c8260d77c5ad7abc061bc06bc596be7c2b':
  Revert "Declare new interface for headset client bluetooth profile to query."
2015-10-29 18:17:41 +00:00
Bryce Lee
461ba0ce4a Merge "Declare new interface for headset client bluetooth profile to query." into cw-e-dev am: a841973dee am: 8b4f21b108
am: 2b47b6eed2

* commit '2b47b6eed247acc95a2d27980b2d20e43c852946':
  Declare new interface for headset client bluetooth profile to query.
2015-10-29 18:15:23 +00:00
Bryce Lee
dc13382622 Add ability to set whether audio route is allowed in BluetoothHeadsetClient
Bug: 25332357
Change-Id: I942ac0dea3e4f8580c44e027a570d0b59822a257
2015-10-28 22:21:54 -07:00
Bryce Lee
70d4210e2e Revert "Declare new interface for headset client bluetooth profile to query."
This reverts commit 694251eaaa.

Change-Id: I588206d8aedb96254c27494dddb32ddc3b6ea0ea
2015-10-29 04:58:38 +00:00
Bryce Lee
694251eaaa Declare new interface for headset client bluetooth profile to query.
This is needed in order to allow implementations of the HFP HF side to
define when audio can be routed to the device. This allows for calls dialed
from an AG to be kept on the AG if desired.

Bug: 25332357
Change-Id: I35a554cfc53f88c7dd3059bf52df5c69df9c7415
2015-10-28 21:06:27 -07:00
Florian Salbrechter
30c3c09071 Merge "Fix wrong javadoc in BluetoothAdapter." 2015-08-20 09:29:29 +00:00
Ajay Panicker
cda6e878cd Implement Bluetooth settings factory reset (2/5)
Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518
2015-08-05 10:35:15 -07:00
Florian Salbrechter
05416af2ae Fix wrong javadoc in BluetoothAdapter.
Calling getSystemService(BLUETOOTH_SERVICE) returns a BluetoothManager.

See ag/661924.

Change-Id: I589837b9db3b7e0bc0639c85f4acf23a8f9fb7d1
2015-07-31 14:43:15 +01:00
Fyodor Kupolov
7bd8be0019 Added a note about location permission
ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission is required to get
results.

Bug: 21852542
Change-Id: I3a2746d691f4d7024b0bb7b884d4436c73ce82e6
2015-07-16 19:40:13 -07:00
Fyodor Kupolov
4044440d2c Merge "Require ACCESS_COARSE_LOCATION for ACTION_FOUND broadcast" into mnc-dev 2015-07-15 01:34:43 +00:00
Fyodor Kupolov
72f491dd86 Require ACCESS_COARSE_LOCATION for ACTION_FOUND broadcast
Receivers of ACTION_FOUND intent are now required to have
ACCESS_COARSE_LOCATION permission.

Bug: 21852542
Change-Id: I8306f7431f067ca36bfc568a912385153fa3d496
2015-07-14 11:38:58 -07:00
Zach Johnson
569ff225a3 Fix BluetoothSocket file descriptor leak
Sockets accepted on a server socket didn't populate
the mPfd field, which is used to close out the java
end of the native-and-java communication socket when
the overall rfcomm socket is closed. #badnewsbears

b/21398841

Change-Id: I3adb0a9965f83d0f3006fa4f79ea4abeab5c9a17
2015-07-14 03:40:49 +00:00
Fyodor Kupolov
a179030483 Do not return devices when caller has no location permission
During startLeScan, do not return devices if calling process has no location
permission/appop

Bug: 21852542
Change-Id: Idce8f4704558574e373e8144390f2a2fa1a7e84a
2015-07-09 21:38:50 +00:00
Jerome Poichet
cd62b10bd6 Preventing leak
When transitioning from ON to OFF with LE Advertisers, advertiser do not
get a chance to unregister themselves as the stopAdvertising checks the
state of the stack and throws before unregistering the object.

It will then never remove the callback objects causing a leak.

b/22092678 | Remote service crash after switching to restricted profile

Change-Id: I04817026a524d10d60abdd8b533554a71a0112e2
2015-06-25 19:20:38 +00:00
Adam Lesinski
8a35137388 Bluetooth energy: fix overflow in calculation
Use longs instead of ints, because the energy values can get pretty
high.

Change-Id: I43e696ad9e5965c2e616b11920db5bfae5db1671
2015-06-15 17:19:07 -07:00
Casper Bonde
3b3d1fea94 SAP: Make it possible to enforce a 16-digit pin code (4/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: I3205013f9e758c353381442a86845dab467780f8
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
2015-06-09 21:42:22 +00:00
Casper Bonde
2328423d19 Add support for MITM for BluetoothSockets (1/4)
This change adds an option to enforce Man-in-the-middle protection
for the authentication process. This feature is needed for the Sim
Access Profile.

Change-Id: Ia3ef0caeb750f88608c9fa6bf6367d1c77de4cf3
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
2015-06-03 03:44:40 +00:00
Casper Bonde
da177bb5a0 SAP: Change to use new SDP Api (4/4)
Added class to carry SAP SDP record data.

Change-Id: Ic0d07402eca52c88e2be101181f6dd12e5e738d0
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
2015-06-03 00:04:37 +00:00
Wei Wang
6f54da32c9 Merge "Expose a few system APIs for BLE scan only mode." into mnc-dev 2015-06-02 17:24:00 +00:00
Wei Wang
f9e3e9e3dd Expose a few system APIs for BLE scan only mode.
Bug: 21562349
Change-Id: Ifc58efcf01edac5b4f9e5266adb966e7bc492209
2015-06-02 10:22:20 -07:00
Nitin Shivpure
1f8b844870 Bluetooth: Fix to avoid framework reboot during monkey testing
When running monkeyrunner, sometimes the framework is disconnected due
to an unhandled Java exception while binding the PAN service (when it
is unsuccessful). Handing the Java exception while binding PAN service
solves this issue.

Change-Id: Idea710593a3f9496305f636042605303e73e7749
2015-06-02 01:23:11 -07:00
Andre Eisenbach
708f57f4dc Un-hide connectGatt() variant with selective transport
Change-Id: I1d3c512160de2bd68550faf243bb151d5cf7f3c9
2015-06-02 02:28:54 +00:00
Prerepa Viswanadham
f5e368ff26 setCallbackType should be public for onlost/onfound apis
Bug: 21304922
Change-Id: I27ed4f3e00ac13354e3ef75e5686916be0d10918
2015-05-19 22:04:56 +00:00
Hemant Gupta
58fbffc36f Bluetooth: Check for mPanService before changing tethering state
Checking for mPanService before changing OR checking tethering state,
otherwise it will lead to application crash while checking isTetheringOn
OR changing tethering state.

Change-Id: I00844c03cdb8616118c1d50d7d31c75e51f0ef9b
2015-05-19 10:07:19 -07:00
Svet Ganov
408abf7f1b Do not report WiFi and Bluetooth MAC addresses - framework.
As a part of the new runtime permissions work we are limiting
the PII apps can access. BT and WiFi MAC addresses are PII and
based on our research there is no valid use case for app dev
to get these addresses aside of user tracking which we are
trying to limit.

bug:21078858

Change-Id: Ib48223b272c0fd4f5c36acc889d4f44df204b309
2015-05-18 15:14:24 -07:00
Tor Norbye
2d49752ee0 Add bluetooth permission annotations
Change-Id: I5bc86f8ec6ea5c873f1e14dab0e0c47c5c9df7f7
2015-05-15 00:18:28 +00:00
Andre Eisenbach
14dcb5f138 Bluetooth native dumpsys logging support (3/5)
Bug: 18508263
Change-Id: I88f9c90dab8b0c825010c8617709449a3dd704b2
2015-05-12 15:56:39 +00:00
Wei Wang
46ab723d55 Allow obtaining BLE capabilities in BLE scan only mode.
Bug:20923734
Change-Id: I7f3e5fd4410da39922be4512e4ba6ccdeb32887d
2015-05-07 16:27:31 -07:00
Prerepa Viswanadham
d1808401ca Merge changes from topic 'mwd-merge-050415' into mnc-dev
* changes:
  Merge commit 'b6f59f4' into master_merge
  Merge commit 'f6db0ce' into master_merge
  Merge commit '17455a3' into master_merge
  Merge commit 'b4d5b32' into master_merge
  Merge commit 'a1a2fa7' into master_merge
  Merge commit '8dfdb98' into master_merge
  Merge commit 'eba66c3' into master_merge
2015-05-05 01:06:38 +00:00
Andre Eisenbach
ab2581398c BluetoothSap class should not be public
Bug: 20823932
Change-Id: I87dfa10b994f7a14c123bb384925c08b34bfbe67
2015-05-04 23:20:28 +00:00
Andre Eisenbach
f455986a45 Add documentation for BluetoothSocket.getConnectionType()
Bug: 20824264
Change-Id: I58aa8f5bbe08ddb252f01f4ad187ae8741963f0b
2015-05-04 21:56:17 +00:00
Prerepa Viswanadham
971cd2b952 Merge commit 'eba66c3' into master_merge 2015-05-01 10:10:22 -07:00
Wei Wang
3af0a8e48d am 17004d63: am 342c22a5: am f2cfe6c0: Merge "Fix a bug in ScanSettings constructor." into mnc-dev
* commit '17004d636712c092d7ac8fdfcf933572481cebfb':
  Fix a bug in ScanSettings constructor.
2015-05-01 09:19:54 +00:00
Wei Wang
f2cfe6c0a9 Merge "Fix a bug in ScanSettings constructor." into mnc-dev 2015-05-01 07:51:40 +00:00
Wei Wang
c5065ee98d Fix a bug in ScanSettings constructor.
Change-Id: I36e6effe8063bacddd61fe2c47c0360d7ffaee71
2015-05-01 00:50:32 -07:00
Wei Wang
3b72899c71 am c869bbfd: am 50b37f8c: am c90c7604: Merge "Honor Ble scanning settings from Settings UI." into mnc-dev
* commit 'c869bbfd94549039624f76740f9bf858b25cfa56':
  Honor Ble scanning settings from Settings UI.
2015-05-01 05:41:17 +00:00
Wei Wang
c90c760431 Merge "Honor Ble scanning settings from Settings UI." into mnc-dev 2015-05-01 05:10:18 +00:00
tturney
5d818eb675 am 129a0b8b: am 94d7494a: am 56c58a2e: Merge "Fix typo. bug: b/20610710" into mnc-dev
* commit '129a0b8bf9a0e531792ac576d217fbc6e0de96c6':
  Fix typo. bug: b/20610710
2015-05-01 01:35:02 +00:00
tturney
56c58a2e27 Merge "Fix typo. bug: b/20610710" into mnc-dev 2015-05-01 00:17:41 +00:00
Wei Wang
67d8416b8e Honor Ble scanning settings from Settings UI.
Bug:20643039

Change-Id: Ib1465108e26b8537c9da1bfbb31a99d2e33da910
2015-04-30 14:45:17 -07:00
Wei Wang
4f261b1dc6 am fb63b682: am 46fa9a96: am 05a419ae: Merge "Temp workaround to track max beacons." into mnc-dev
* commit 'fb63b6820d13ae3cf66418014a2051e87445edf9':
  Temp workaround to track max beacons.
2015-04-30 15:34:51 +00:00