Commit Graph

1246 Commits

Author SHA1 Message Date
Hansong Zhang
a2a46a4742 Merge "Hearing Aid: change get/set active device (3/3)" am: a23007dd54
am: 29e1c0e494

Change-Id: I62e456026531bc8921990c713595907f6f48fcf4
2018-04-04 17:03:26 -07:00
Hansong Zhang
8d799f8340 Hearing Aid: change get/set active device (3/3)
* setActiveDevice() returns false in error case, e.g. when the device is
not connected
* add getActiveDevices() instead of isActiveDevice(), which returns a list
that must have two elements: left and right, or empty list on error

Test: manual
Bug: 69623109
Change-Id: I48f3388c56434d0c21e09bd8b794e58848cd8794
2018-03-29 17:54:24 -07:00
Hansong Zhang
923f5cf935 Merge "Bluetooth HIDD: Remove unplug()" am: 18aa649b8f
am: d8ae68626f

Change-Id: Iacdbc31172e87621127d66e8214307a14ab76499
2018-03-29 01:43:24 +00:00
Hansong Zhang
dbc6d14f6e Bluetooth HIDD: Remove unplug()
Remove the hidden unplug() API because it is not used and it can cause
the remote device to be unpaired. System apps should use unbond() and
user apps should not use reflection to invoke it.

Bug: 67866553
Test: SL4A
Change-Id: I1bdc06dbb5460c9fd52230b78cbf9434a4349d24
2018-03-28 20:11:18 +00:00
Zach Johnson
31595b3156 Merge "Revert "Bluetooth: preserve one advertisement slot for GMS core"" into pi-dev
am: 5bdf063537

Change-Id: I195b1f1da0cd8e94fe1f575cae1c1b052d46ed4a
2018-03-23 21:03:04 +00:00
Hansong Zhang
a84feb191f Merge "Hearing Aid Profile: set and get activeDevice" into pi-dev
am: 9753e774ce

Change-Id: I39f848921e56d07d78397509687bc56b39a83e79
2018-03-23 20:02:44 +00:00
Hansong Zhang
7ca303c3b8 Hearing Aid Profile: set and get activeDevice
Add setActiveDevice() for Hearing Aid Profile in SettingsLib

Bug: 69623109
Test: robolectric test and manual test
Change-Id: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
Merged-In: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
(cherry picked from commit d7b3591659)
2018-03-23 12:27:33 -07:00
TreeHugger Robot
5bdf063537 Merge "Revert "Bluetooth: preserve one advertisement slot for GMS core"" into pi-dev 2018-03-23 19:18:41 +00:00
Zach Johnson
14faa2d49b Revert "Bluetooth: preserve one advertisement slot for GMS core"
This reverts commit 7020b015e9.

Reason for revert: This breaks platforms that only support a single advertising slot.

Bug: 76135219
Test: advertising does not work, revert change, advertising works
Change-Id: Ib8c823eb9990cc06bad95c8c3ad0129afb245e00
2018-03-23 17:30:56 +00:00
Ivan Podogov
153592fa3c Merge "HIDD: Address API Review concerns" am: 8085d6f247
am: 6c64e83577

Change-Id: Ibcdc31fcb01a583ca05c056b2063f77c0f4dbeb6
2018-03-22 23:13:16 +00:00
Treehugger Robot
8085d6f247 Merge "HIDD: Address API Review concerns" 2018-03-22 21:50:57 +00:00
Ivan Podogov
f2f5dc355f HIDD: Address API Review concerns
* Replace bare field usage with getter methods;
 * Remove Builder;
 * Move BluetoothHidDeviceCallback to inner class;
 * Remove toArray() and equals();
 * Throw IllegalArgumentException where applicable;
 * Add an Executor parameter before Callback;

Bug: 72168436, 72168126
Test: make update-api, make, make sl4a.Common
Change-Id: I13095458bf3ded7a376e8d20fd13df12ef426693
2018-03-21 09:44:57 -07:00
Hansong Zhang
d7b3591659 Hearing Aid Profile: set and get activeDevice
Add setActiveDevice() for Hearing Aid Profile in SettingsLib

Bug: 69623109
Test: robolectric test and manual test
Change-Id: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
2018-03-20 15:33:36 -07:00
Ajay Panicker
5b3626573c Merge "Add the AVRCP Target Service (2/2)" am: 61265410e8
am: a33ad4f2bd

Change-Id: I2f34d563e1bf8224a9388701d9d8718d7aec3a0a
2018-03-19 20:15:32 +00:00
Qiyu Hu
7020b015e9 Bluetooth: preserve one advertisement slot for GMS core
This brings back the check on the multiple advertisement support before
granting any Bluetooth LE advertiser. In other words, one slot is preserved
for GMS core.

Bug: 74819586
Test: Run an BLE application and verify the number of advertisements
Change-Id: I05014e597bd5868f18a81842dc341e47991f2c79
2018-03-16 12:22:16 -07:00
Ajay Panicker
38c3073ba2 Add the AVRCP Target Service (2/2)
Add the AVRCP Target constant to Bluetooth Profile. Also remove redundant
public static final modifier on the constants.

Bug: 68854188
Test: Compiles and local test with service enabled
Change-Id: If2ec607fc704c225f8903d438fe970dfafac25f1
2018-03-16 18:22:00 +00:00
Miao-chen Chou
158344f78a Merge "Bluetooth: preserve one advertisement slot for GMS core" am: 00cc1847d3
am: 922ae0237f

Change-Id: Ifd790251d6531d3556af7b470e681f06f3e25070
2018-03-16 01:30:30 +00:00
Miao-chen Chou
9d3389d17e Bluetooth: preserve one advertisement slot for GMS core
This brings back the check on the multiple advertisement support before
granting any Bluetooth LE advertiser. In other words, one slot is preserved
for GMS core.

Bug: 74819586
Test: Run an BLE application and verify the number of advertisements
Change-Id: Iac3b47c76c6f699018982a69e9b04a9d8c631bfb
2018-03-14 16:35:11 -07:00
Jack He
bd020a6f5a Bluetooth: Use enums for adapter connection states
Bug: 69478930
Test: make, no user visible change
Change-Id: I999d0c445fe3b24aca72961c40c3428901542bc1
(cherry picked from commit ee81f99150)
2018-03-05 17:27:05 -08:00
Jack He
775c458d40 Merge "Bluetooth: Use enums for adapter connection states" am: 95372e873e
am: 8da4504cad

Change-Id: I7e0ed2b7a0b67bb443b9e104a7985e3a9bed96ff
2018-03-06 01:17:15 +00:00
Jack He
ee81f99150 Bluetooth: Use enums for adapter connection states
Bug: 69478930
Test: make, no user visible change
Change-Id: I999d0c445fe3b24aca72961c40c3428901542bc1
2018-03-05 11:23:31 -08:00
Ajay Panicker
566f5b30c0 Merge "Bluetooth: Remove adjustAvrcpAbsoluteVolume" am: 2cd2a6aef0 am: ad2f9017ad
am: d8185da227

Change-Id: Id99f889cb15789f36bc2c9c57ebdc58f730eb800
2018-03-01 21:35:34 +00:00
Ajay Panicker
d8185da227 Merge "Bluetooth: Remove adjustAvrcpAbsoluteVolume" am: 2cd2a6aef0
am: ad2f9017ad

Change-Id: I2526a89c6f366a77dbbeb0b3310438cbef2af857
2018-03-01 21:27:16 +00:00
Ajay Panicker
2a216f3999 Bluetooth: Remove adjustAvrcpAbsoluteVolume
The AudioManager now handles all calculations for volume stepping now
and no longer uses adjustAvrcpAbsoluteVolume.

Bug: 68812037
Test: Compile
Change-Id: I9cbf7989e49738c7a43fe3142aced5803111271e
2018-03-01 19:04:55 +00:00
Jakub Pawlowski
ddd4ca1e1b Merge "Use assigned UUID for Hearing Aid Service" am: d310970d36 am: 7f2091c522
am: 8d03a60930

Change-Id: I4c255621db616337c20d8e239dfe409545dea18a
2018-02-26 19:38:59 +00:00
Jakub Pawlowski
8d03a60930 Merge "Use assigned UUID for Hearing Aid Service" am: d310970d36
am: 7f2091c522

Change-Id: I3e54498760d071a38d60467c2865a77374f8c928
2018-02-26 19:31:12 +00:00
Jakub Pawlowski
5027679041 Use assigned UUID for Hearing Aid Service
Test: manual
Bug: 64038649
Change-Id: Iab748db944df3bba8927973d0a55d95514b9f8ed
2018-02-26 18:12:19 +00:00
Jeff Sharkey
98af2e4fec Add RequiresFeature annotation.
Certain APIs require that a device have a specific feature to operate
correctly, so start annotating them.

Test: builds, boots
Bug: 72284763
Change-Id: Ie2f30284bdfdb6acc4067f434eba3b5433837606
Exempt-From-Owner-Approval: simple annotations
2018-02-16 20:45:22 +00:00
Jakub Pawlowski
699debe2ca Merge "Hearing Aid profile" am: aca4460b64 am: edb16b0f4b
am: 44197bd188

Change-Id: Idd601780e2e9483324dbf2e317c925daa78fa049
2018-02-15 06:10:08 +00:00
Jakub Pawlowski
44197bd188 Merge "Hearing Aid profile" am: aca4460b64
am: edb16b0f4b

Change-Id: Ica92a9ffecb205f07288139970cd83f578ef7669
2018-02-15 05:49:13 +00:00
Jakub Pawlowski
ea580fa1d1 Hearing Aid profile
This is implementation of Hearing Aid Profile that will in future
be connected to Bluetooth Manager - see TODOs in BluetoothHearingAid.java

Bug: 69623109
Test: compilation. Manual test with HA.
Change-Id: I79643ea1e14e9df7f5771169359c964a60c56618
2018-02-14 14:24:44 -08:00
Stanley Tng
8c3e3d178e Merge "Add function to change LE Tx Data Length" am: 383a7d432f am: cffe307fa5
am: 3a19b325c1

Change-Id: I717bfaa6fa452be311b493199dfc59a9124a73f0
2018-02-06 04:18:57 +00:00
Stanley Tng
3a19b325c1 Merge "Add function to change LE Tx Data Length" am: 383a7d432f
am: cffe307fa5

Change-Id: I02a15bfc36d8c8817c45e4c6f56ebbfbbf571338
2018-02-06 03:27:07 +00:00
Stanley Tng
918c5241c0 Add function to change LE Tx Data Length
As part of new SL4A tests for LE CoC to measure data throughput, this
commit adds a function to set the LE Tx Data Length parameter to its
maximum.

Test: Ran the new ACTS Tests for LE CoC (BleCocTest and BleCoc2ConnTest)
Bug: 70683224
Change-Id: Iea93f6cb9f4f7cc484f121afa158d7dae18d1ef1
2018-02-04 15:55:39 -08:00
Stanley Tng
1f3b464471 Merge "Add function to update LE connection parameters" am: 853628db72 am: c3afcfc38c
am: a4c600cb03

Change-Id: I3bbb6c7a0f51d17690c3ae47a228758a45c155ee
2018-02-04 01:20:48 +00:00
Stanley Tng
a4c600cb03 Merge "Add function to update LE connection parameters" am: 853628db72
am: c3afcfc38c

Change-Id: Ib35d2c5314dcf6d12abf4d097b10dfc5df34bb55
2018-02-03 04:21:58 +00:00
Jeff Sharkey
ad357d1839 Pass in the user defined by Context.
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.

This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.

Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
2018-02-03 02:11:45 +00:00
Stanley Tng
6da1ddaa53 Add function to update LE connection parameters
As part of new SL4A tests for LE CoC to measure data throughput
performance, this commit will add a function to enable the CoC Facade
to modify the LE Connection Parameters especially the Connection
Intervals.

Test: Ran the new ACTS Tests for LE CoC
Bug: 70683224
Change-Id: Ie071b09a44d68fe063198a39eb788c434b092442
2018-02-01 15:27:14 -08:00
Ricardo Loo Foronda
8e2af19744 Merge "docs: Added a missing "be" in ACTION_CONNECTION_STATE_CHANGED" into oc-mr1-dev am: 1299d4b0a9
am: d5a62bebc3

Change-Id: Ie138a98a87f9f4fb895d2b9f834d43ac04866b86
2018-01-29 02:47:50 +00:00
Ricardo Loo Foronda
d5a62bebc3 Merge "docs: Added a missing "be" in ACTION_CONNECTION_STATE_CHANGED" into oc-mr1-dev
am: 1299d4b0a9

Change-Id: Ib2911651950048305b00df5f26ca5656e205bcee
2018-01-29 02:39:30 +00:00
Pavlin Radoslavov
bc2e4a230b Merge "Add support for Multi-A2DP state machines per device" am: bb5318df8a
am: adf2239562

Change-Id: Ibe372b2ecda317e7970d6e681a4e2330e69782c1
2018-01-27 00:01:20 +00:00
Pavlin Radoslavov
080a0e781c Add support for Multi-A2DP state machines per device
* Update usage of A2dpService API calls that take BluetoothDevice
  as an additional argument
* Update the description for BluetoothA2dp.connect()

Exempt-From-Owner-Approval: De-facto owner of the relevant changes is
the Bluetooth team.
Bug: 69269748
Test: Manual
Change-Id: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
Merged-In: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
(cherry picked from commit 502af2192c)
2018-01-26 13:08:00 -08:00
Ricardo Loo Foronda
f710a2307a docs: Added a missing "be" in ACTION_CONNECTION_STATE_CHANGED
Status: Ready for writer review.
Note: This is a javadoc only change.

Test: Build the docs with "make ds-docs" and staged updated content.
Staged content:
go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html#ACTION_CONNECTION_STATE_CHANGED

Bug: 69097875
Change-Id: Ibffea2373ded825558beaa669ae4daf3c0ff3d2f
2018-01-26 18:16:05 +00:00
Pavlin Radoslavov
502af2192c Add support for Multi-A2DP state machines per device
* Update usage of A2dpService API calls that take BluetoothDevice
  as an additional argument
* Update the description for BluetoothA2dp.connect()

Exempt-From-Owner-Approval: De-facto owner of the relevant changes is
the Bluetooth team.
Bug: 69269748
Test: Manual
Change-Id: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
2018-01-25 11:05:25 +00:00
Stanley Tng
518c679c1f Merge "Added APIs for Connection-oriented channels" am: e1992384e0 am: 288915bedc
am: 39f133eed2

Change-Id: I79afa5ef129790588dca91266f79a6125edefd06
2018-01-18 18:19:25 +00:00
Stanley Tng
39f133eed2 Merge "Added APIs for Connection-oriented channels" am: e1992384e0
am: 288915bedc

Change-Id: Iaf2aa40e8e6e2621c146fcabe0f46c3dd1bfedc4
2018-01-18 18:08:37 +00:00
Treehugger Robot
e1992384e0 Merge "Added APIs for Connection-oriented channels" 2018-01-18 16:42:33 +00:00
Pavlin Radoslavov
fd77635da1 Merge "Added internal API getMaxConnectedAudioDevices()" am: 877cbe1dc2 am: 18606e1601
am: 9114a49770

Change-Id: I55d0175bb715dbd28176032ace129a2c85a218f0
2018-01-18 02:25:31 +00:00
Pavlin Radoslavov
9114a49770 Merge "Added internal API getMaxConnectedAudioDevices()" am: 877cbe1dc2
am: 18606e1601

Change-Id: I58199a6c70bfa03fc515c573b936c78ec34d61ac
2018-01-18 02:18:03 +00:00
Joseph Pirozzo
a246885905 Merge "Bluetooth in band ring" am: dbfaf31357 am: 8c73ee91f5
am: 2746e9ab16

Change-Id: I2d43475d33c764b2b0951f7e4ddc969e8fce7c49
2018-01-18 01:19:19 +00:00