Commit Graph

878 Commits

Author SHA1 Message Date
Jakub Pawlowski
83c4712abd Merge "Bluetooth 5 spelling fixes" 2017-03-11 02:22:39 +00:00
Jakub Pawlowski
53501ad210 Bluetooth 5 spelling fixes
Bug: 30622771
Test: manual
Change-Id: I46b6486619cc7366e56b25ca48937e6792f53e1d
2017-03-11 00:30:17 +00:00
Eugene Susla
36e866b8e0 Support multiple filters per association request
By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided

Change-Id: I0a978787551a1ee5750ec5544b241d3bbfed5a7c
2017-03-09 17:52:49 -08:00
Hector Tellez
d66c95fa90 Revert "Support multiple filters per association request"
This reverts commit e70e6aa62c.

Change-Id: I12857cbbea0a0c74521191ab5e3713db230626ab
2017-03-09 17:55:43 +00:00
Eugene Susla
e70e6aa62c Support multiple filters per association request
By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided
Change-Id: I6621da388e2bf4ed97c5af2692629a321d0b63c7
2017-03-08 16:52:14 -08:00
Srinivas Visvanathan
3b12f4cf02 Merge "Adding handle extra in unread-message broadcast" 2017-03-08 02:14:22 +00:00
Jakub Pawlowski
5324a14cf4 Bluetooth 5 Advertising API
Test: manual
Bug: 30622771
Change-Id: Id6856e6110872ec50ff1af54ddc75c0104a6459c
2017-03-08 01:12:16 +00:00
Jakub Pawlowski
db5a87d50d Bluetooth 5 PHY selection API
Bug: 30622771
Test: manual
Change-Id: I50262a56a70466439f9700549c3c0e7bd49e2e8d
2017-03-08 01:09:04 +00:00
Jakub Pawlowski
a48e03745b Bluetooth 5 periodc scan API (1/2)
Bug: 30622771
Test: manual
Change-Id: I61853bc71f6013e9406d1d151bb51ea4484bb92c
2017-03-08 01:06:25 +00:00
Jakub Pawlowski
9de522c6e4 Bluetooth 5 enhanced scanning API
Bug: 30622771
Test: manual
Change-Id: I2c8065fbcedf48777ce18c7d8fe621e568b3fd75
2017-03-08 01:05:13 +00:00
Jakub Pawlowski
2844a30f6c Merge "Bluetooth 5 feature check API (1/2)" 2017-03-08 01:02:15 +00:00
Hemant Gupta
87d48cdeae Merge "Bluetooth: Expose L2CAP API to support OPP 1.2" am: 79eb213a98 am: 12358b4057
am: 31428b1e6d

Change-Id: Ic2ff9eb34ebc8aada030f5e3e8d040c29f9b7186
2017-03-08 00:48:54 +00:00
Hemant Gupta
12358b4057 Merge "Bluetooth: Expose L2CAP API to support OPP 1.2"
am: 79eb213a98

Change-Id: I5f82a0c40c64fca0701abba44693b2892209acf3
2017-03-08 00:38:14 +00:00
Jakub Pawlowski
79d66495c3 Bluetooth 5 feature check API (1/2)
Bug: 30622771
Test: manual
Change-Id: I90e2efe989745c07c2f2fb8f4ea5bc3b718382f6
2017-03-07 23:57:58 +00:00
Srinivas Visvanathan
86a8c1cabb Adding handle extra in unread-message broadcast
- Handle will be useful for messaging apps.

Bug: 33280056
Test: Manually
Change-Id: Id4b1bf2d90d9eaea1504cc270a922a1d6f1c468b
2017-03-07 10:22:53 -08:00
Hemant Gupta
ef3e0dbf00 Bluetooth: Expose L2CAP API to support OPP 1.2
Add changes to expose L2CAP API to create an insecure L2CAP socket
for supporting OPP 1.2.

Test: Connect with Remote OPP Client supporting OPP 1.2 and verify
that connection and transfer happens over L2CAP. Connect with Remote
OPP Client supporting OPP 1.1 and verify that connection and transfer
happens over RFCOMM.

Bug: 33010988
Change-Id: I21ed672afb4ed5d2355ff0a0f9691af220921c1f
2017-03-07 02:30:52 +00:00
Srinivas Visvanathan
ad90338d2b Defining extras for New Unread-Message Broadcast
- Defining extras for sender fields in the Broadcast intent.

Bug: 33280056
Test: Manually
Change-Id: Ie77bee498141c079f6f2ec811e527230c95e8831
2017-03-03 09:57:18 -08:00
Pavlin Radoslavov
489ce07b81 Merge "Add a mechanism to configure the default A2DP codec priorities" am: acf34d8b62 am: cd6e0ee19d am: b7067e2b6c
am: 537eaf0f6e

Change-Id: I42186a561d59decb0d811b3f5b8d5bf96df53152
2017-02-07 14:05:43 +00:00
Pavlin Radoslavov
b7067e2b6c Merge "Add a mechanism to configure the default A2DP codec priorities" am: acf34d8b62
am: cd6e0ee19d

Change-Id: I6fb8a3a35451cf2d1e228466ef4a4d4e89d1d4ca
2017-02-07 00:10:21 +00:00
Pavlin Radoslavov
2199339c39 Add a mechanism to configure the default A2DP codec priorities
Previously, the relative codec priorities were hard-codec internally.
The new mechanism uses the following configurable resources in
packages/apps/Bluetooth/res/values/config.xml to re-assign the
default codec priorities per device, or to explicitly disable a codec.

 - a2dp_source_codec_priority_sbc
 - a2dp_source_codec_priority_aac
 - a2dp_source_codec_priority_aptx
 - a2dp_source_codec_priority_aptx_hd
 - a2dp_source_codec_priority_ldac

Those values are assigned on startup.
Also, they can be changed per device by using an overlay:
device/<VENDOR>/<DEVICE>/overlay/packages/apps/Bluetooth/res/values/config.xml

Test: Manually streaming to a headset
Change-Id: Ic4da3a51ac73f00cbae731156cb7878c8fadee06
2017-02-06 13:07:23 -08:00
Eugene Susla
6ed45d8cd3 CompanionDeviceManager
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device

Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
 and go through the flow. Ensure filtering works, and device is returned to
 the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
2017-02-06 12:50:55 -08:00
Pavlin Radoslavov
45250aca6d Merge "Update the A2DP Codec Config API" am: ccd60f7cbe am: f0096fb868 am: 91707989c4
am: 1ef3c9888e

Change-Id: If69bfe9839a35dc141d741695a217fa4805d46cc
2017-01-31 19:25:11 +00:00
Pavlin Radoslavov
91707989c4 Merge "Update the A2DP Codec Config API" am: ccd60f7cbe
am: f0096fb868

Change-Id: Ibc7d4b500adc4451978f366557b93dc6b6d3da63
2017-01-31 19:13:05 +00:00
Pavlin Radoslavov
b37f181c98 Update the A2DP Codec Config API
Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
 1. The current codec config
 2. The list of codecs containing the local codecs capabilities
 3. The list of codecs containing the selectable codecs capabilities.
    This list is the intersection of the local codecs capabilities
    and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
 * Added new class BluetoothCodecStatus that contains the extra info:
   current codec config, local codecs capabilities and selectable
   codecs capabilities
 * Renamed method getCodecConfig() to getCodecStatus() and return the
   corresponding BluetoothCodecStatus object.
 * Updates to class BluetoothCodecConfig:
   new methods isValid(), getCodecName(), and updated toString()
   so it is more user friendly
 * Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
   EXTRA_PREVIOUS_CODEC_CONFIG.
   The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
   the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs
Change-Id: Ia1af2c22e521e863e28a360610aca49f7e62d31b
2017-01-31 18:58:27 +00:00
Marie Janssen
2db3f99cfe Merge "Bluetooth: add getDiscoveryEndMillis() call" am: 1785fc4eea am: 7f8d8638eb am: ca312c1cd3
am: 9eb3d7e335

Change-Id: I45a29862c9a841b68bee41daff1d8e46145cbd79
2017-01-30 19:11:46 +00:00
Marie Janssen
ca312c1cd3 Merge "Bluetooth: add getDiscoveryEndMillis() call" am: 1785fc4eea
am: 7f8d8638eb

Change-Id: I6f02c4ddc0fe56cda5af2dcf2f5193ba13522792
2017-01-30 17:57:02 +00:00
Marie Janssen
23a4833157 Bluetooth: add getDiscoveryEndMillis() call
Method to tell when the adapter finished (or will finish) being in
discovery mode.

Test: compiles and still can scan
Bug: 34395439
Change-Id: I41b48c2b934c0a1d5e1727cec08f3f762e3cb309
2017-01-27 18:48:11 -08:00
Pavlin Radoslavov
02e806550c Merge "Integration of the AAC codec for A2DP source" am: 22f97c83fb am: f23e80bb9b am: d364208388
am: 78798cc13d

Change-Id: Ic645f9ee2eb090fc805a25a1449642dad021db4e
2017-01-26 19:42:16 +00:00
Pavlin Radoslavov
d364208388 Merge "Integration of the AAC codec for A2DP source" am: 22f97c83fb
am: f23e80bb9b

Change-Id: If2d85eba17f7ece5b3d19e3ee8fc86b7cf9bc062
2017-01-26 19:25:37 +00:00
Pavlin Radoslavov
b33bd5bc2e Integration of the AAC codec for A2DP source
Test: A2DP streaming to AAC headsets
Bug: 30958229
Change-Id: I1b530f1c5c495b8231fd68bed788d4567096683d
2017-01-26 09:06:02 -08:00
Sanket Agarwal
c8399321e9 Change HFP Client API to support multi device
- Adds BluetoothDevice as a parameter where required
- Gets rid of device management APIs that can be done via
  BluetoothProfiles instead

Test: Manual sanity tests
Bug: b/33554547
Bug: b/30984220
Change-Id: I3485ac5bfe1fcb29c774ad040fdd608e1cacb8df
(cherry picked from commit 039eeb81b5)
2017-01-23 22:53:58 +00:00
Sanket Agarwal
a3ae5c4e24 Change HFP Client API to support multi device
- Adds BluetoothDevice as a parameter where required
- Gets rid of device management APIs that can be done via
  BluetoothProfiles instead

Test: Manual sanity tests
Bug: b/33554547
Bug: b/30984220
Change-Id: I3485ac5bfe1fcb29c774ad040fdd608e1cacb8df
(cherry picked from commit 039eeb81b5)
2017-01-20 19:30:35 -08:00
Sanket Agarwal
039eeb81b5 Change HFP Client API to support multi device
- Adds BluetoothDevice as a parameter where required
- Gets rid of device management APIs that can be done via
  BluetoothProfiles instead

Test: Manual sanity tests
Bug: b/33554547
Bug: b/30984220
Change-Id: I3485ac5bfe1fcb29c774ad040fdd608e1cacb8df
2017-01-20 14:55:15 -08:00
Neil Fuller
261a1dcffd Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket" am: 649a89e524 am: f4e236c794 am: 43d53395dc
am: 75f84f2261

Change-Id: I5cf584048e1e2cde67c33d77e99cd181db4e8c82
2017-01-11 15:45:29 +00:00
Neil Fuller
43d53395dc Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket" am: 649a89e524
am: f4e236c794

Change-Id: If23b5efe912c5b0a76487c46723288ff6a903a14
2017-01-11 13:48:14 +00:00
Neil Fuller
7fd724611b Refactor RFCOMM / BluetoothSocket usage of LocalSocket
LocalSocket is used by BluetoothSocket. BluetoothSocket
passes a pre-created file descriptor to LocalSocket that
is then given to the LocalSocketImpl.

Commit b08c7bc0bd broke the
behavior. Commit 7a8c36aa4e
put in a minimal fix.

This change tidies up LocalSocket and associated classes
and replaces a specialist constructor with a factory method
to highlight the special case. While there an unnecessary
exception has been removed.

Bug: 34111534
Test: Boot device
Test: vogar --mode app_process tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I4ba2f2d9ea361a950ff8bc8d64fc800d998c3210
2017-01-06 14:18:07 +00:00
Pavlin Radoslavov
3c0baf0082 Merge "Integration of the LDAC codec for A2DP source" am: 3c050268f0 am: bb8f1cd92b am: 7d14914239
am: 01be004c72

Change-Id: Ia0bdac1d25993519e85f962e7b7624ae5740e685
2017-01-05 08:04:26 +00:00
Pavlin Radoslavov
7d14914239 Merge "Integration of the LDAC codec for A2DP source" am: 3c050268f0
am: bb8f1cd92b

Change-Id: I62f8462330d7661b8008abf862c4d4bb47c129dc
2017-01-05 07:55:27 +00:00
Pavlin Radoslavov
9569ea0b93 Merge "Integration of the aptX and aptX-HD codecs for A2DP source" am: 5242acbd0b am: a750c90ac1 am: 5aaa985e97
am: 546866988a

Change-Id: Id2eb6fc928098fffdf1be85bc708efa8a1b7a339
2017-01-05 02:17:35 +00:00
Pavlin Radoslavov
fad8b730d2 Integration of the LDAC codec for A2DP source
The codec can be used if the encoding shared library is installed
on the device:
 libldacBT_enc.so

Test: A2DP streaming to LDAC headsets
Bug: 30958229

Change-Id: I524805fd308b5181427515617eda05625a7c4ae5
2017-01-04 18:07:29 -08:00
Pavlin Radoslavov
5aaa985e97 Merge "Integration of the aptX and aptX-HD codecs for A2DP source" am: 5242acbd0b
am: a750c90ac1

Change-Id: I7957fb151bb113485240fdc2bae1cdd380930f27
2017-01-05 02:07:05 +00:00
Pavlin Radoslavov
feeb9b245c Integration of the aptX and aptX-HD codecs for A2DP source
Each of the codecs can be used if the corresponding encoding
shared library is installed on the device:
 - aptX: libaptX.so
 - aptX-HD: libaptXHD.so

Test: A2DP streaming to aptX and aptX-HD headsets
Bug: 30958229
Change-Id: I24faddc8cd88ae3e1370922c633f30e13124a867
2017-01-04 16:30:35 -08:00
Ivan Podogov
c8daa78a42 Merge "HID Device role API fixes" am: f33a71d017 am: a7d58fecc6 am: 8e2e2b1381
am: daa72ea3ab

Change-Id: I7ee44e6d952c5d9760e04572d2009fe107aad80b
2017-01-04 10:48:34 +00:00
Ivan Podogov
8e2e2b1381 Merge "HID Device role API fixes" am: f33a71d017
am: a7d58fecc6

Change-Id: Iab0dc91a8e2d4066d5eb85ec4771d42642783671
2017-01-04 10:41:26 +00:00
Ivan Podogov
f33a71d017 Merge "HID Device role API fixes" 2017-01-04 10:32:41 +00:00
Pavlin Radoslavov
858ab99071 Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96 am: 8b46f87e7e am: da3de76bdb
am: 62c5226e9c

Change-Id: I14d4cc2dc91cb1ab431eda32d5066ac8f471c3a6
2017-01-04 03:54:18 +00:00
Pavlin Radoslavov
da3de76bdb Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96
am: 8b46f87e7e

Change-Id: I39e4b90491f646887200649954b652d9f5439925
2017-01-04 03:44:40 +00:00
Pavlin Radoslavov
44a4ef0aa9 Add a mechanism for configuring the A2DP Source codecs
* Added a new class BluetoothCodecConfig that contains codec-related
  configuration or capabilities: codec type, priority, sample rate,
  bits per sample, channel mode, and codec specific fields.

* Extended the Bluetooth A2DP AIDL interface to get/set the current
  codec configuration

* Added new call handleBluetoothA2dpDeviceConfigChange() to the Media
  Framework that is called when there are changes in the
  Bluetooth A2DP device configuration - e.g., the A2DP codec is changed.

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: I9a82716cbc2a5efbe77352a031ac80c88f6a2459
2017-01-03 17:52:52 -08:00
Ivan Podogov
dd87cd3bb6 HID Device role API fixes
This change makes HIDD API more like the other ones, i.e.
supporting multiple devices, and implements missing methods.

While the underlying implementation may still only support a
single device at a time, the "device" parameter can still be
useful for checking if the application is trying to send the
data to a correct device.

Test: make
Change-Id: I55fe04c0762a96fcddd6c6678e790361d648111a
2017-01-03 22:36:30 +00:00
Ivan Podogov
d57df642d7 Fix profiles broken by ag/1751147 am: 5297dba712 am: 72d9008700
am: 0ad19476cb

Change-Id: I6e69bac35f1d3ec78b64287f4faa86103357e136
2016-12-30 23:22:36 +00:00