Commit Graph

1371 Commits

Author SHA1 Message Date
Jean-Michel Trivi
103a678ac3 Merge "AudioDeviceBroker in audio service" 2019-01-25 22:31:09 +00:00
Jean-Michel Trivi
5885037c88 AudioDeviceBroker in audio service
New AudioDeviceBroker class running in audio service.
Has dedicated message loop for handling audio device
   connections and disconnections.
New helper classes for AudioDeviceBroker:
 - BtHelper for Bluetooth
 - AudioDeviceInventory to manage list of devices

Bug: 112863932
Test: media CTS + audio CTS Verifier
Change-Id: I3e8f662a9d82fa7245695888e14fac7f4fc6e728
2019-01-25 11:03:50 -08:00
Ugo Yu
d02a78bd95 Merge "Introduce system APIs for Bluetooth silence mode." am: d17b284bdb am: 5a5217d2b8
am: 26b4283a13

Change-Id: I07f8019e748495b05ea09bab69ec72c0ab9f271b
2019-01-24 11:21:36 -08:00
Ugo Yu
26b4283a13 Merge "Introduce system APIs for Bluetooth silence mode." am: d17b284bdb
am: 5a5217d2b8

Change-Id: Icdc5720da633f3cba7e1acb730b4ca21475d6f4b
2019-01-24 10:37:47 -08:00
Treehugger Robot
d17b284bdb Merge "Introduce system APIs for Bluetooth silence mode." 2019-01-24 18:08:05 +00:00
Ugo Yu
f3b120041d Merge "Change MetadataListener to a abstract static class" am: 9d3ce3e55e am: 745c6de6eb
am: f2d656b438

Change-Id: I68915d6190faa22e20b03321dc5895a37e6de5f8
2019-01-23 23:43:29 -08:00
Ugo Yu
f2d656b438 Merge "Change MetadataListener to a abstract static class" am: 9d3ce3e55e
am: 745c6de6eb

Change-Id: I796dfccf741a1ef6c45d804772415ed198e8e8d1
2019-01-23 23:30:18 -08:00
Treehugger Robot
9d3ce3e55e Merge "Change MetadataListener to a abstract static class" 2019-01-24 07:07:49 +00:00
Stanley Tng
38acb197cf Merge "Add Android APIs for Hearing Aids Profile" am: a53fc20213 am: 62a2308550
am: 31b70c2868

Change-Id: Iac7fe414ddc1fbc04e8bbe3c2e96d3d57d364995
2019-01-23 19:10:10 -08:00
Stanley Tng
7b85a217b2 Merge "Add 2 new ways to check for Support for Hearing Aids Profile" am: 7982e6f346 am: c144c329ab
am: 61c1afaa45

Change-Id: Ib2808f47c6df08b68a35c4cc7da269e8fbf009d4
2019-01-23 19:01:19 -08:00
Stanley Tng
31b70c2868 Merge "Add Android APIs for Hearing Aids Profile" am: a53fc20213
am: 62a2308550

Change-Id: Id9eccff5eb088f8c2638f242ff1ec6260093c1d4
2019-01-23 18:46:08 -08:00
Stanley Tng
61c1afaa45 Merge "Add 2 new ways to check for Support for Hearing Aids Profile" am: 7982e6f346
am: c144c329ab

Change-Id: If877f5b24f5201efa9448723be90d62f194bf2d6
2019-01-23 18:39:31 -08:00
Ugo Yu
d9a0a7fd55 Change MetadataListener to a abstract static class
Bug: 121051445
Test: build pass
Change-Id: I8148d13d2eb0899d54817197ae0be236e2914e47
2019-01-24 09:48:20 +08:00
Treehugger Robot
a53fc20213 Merge "Add Android APIs for Hearing Aids Profile" 2019-01-24 01:37:05 +00:00
Treehugger Robot
7982e6f346 Merge "Add 2 new ways to check for Support for Hearing Aids Profile" 2019-01-24 01:34:24 +00:00
Ugo Yu
bfbe0ee89d Introduce system APIs for Bluetooth silence mode.
Policies of silence mode:
1) If an active device (for A2DP or HFP) enters silence mode,
   the active device for that profile will be set to null.
2) If a device exits silence mode while the A2DP or HFP active
   device is null, the device will be set as the active device
   for that profile.
3) If a device is disconnected, it exits silence mode.
4) If a device is set as the active device for A2DP or HFP,
   while silence mode is enabled, then the device will exit
   silence mode.
5) If a device is in silence mode, AVRCP position change event
   and HFP AG indicators will be disabled.
6) If a device is not connected with A2DP or HFP, it cannot
   enter silence mode.

Bug: 112323989
Test: Manual, runtest bluetooth
Change-Id: If7f340de38c350f17c37f00a3a2e871876baa20d
2019-01-24 08:40:51 +08:00
Ugo Yu
250227d18b Merge "Skeleton implementation of Bluetooth metadata APIs" am: 625a1f4461 am: 2f1cba20a5
am: 716eb586ac

Change-Id: I0ac4ea988598a190d4c14378c072def122f4257e
2019-01-23 00:24:02 -08:00
Ugo Yu
716eb586ac Merge "Skeleton implementation of Bluetooth metadata APIs" am: 625a1f4461
am: 2f1cba20a5

Change-Id: If532d6e87a7d863f0802084f945b12406152d666
2019-01-23 00:12:42 -08:00
Stanley Tng
1f5ea66a39 Add Android APIs for Hearing Aids Profile
Add the new public Android APIs for the ASHA Hearing Aids Profile.

Bug: 119617521
Bug: 120222233
Test: Run with the new HearingAidProfileTest CTS test
Change-Id: I05fc3d565bd22b5000765122da7714d961dbc15b
2019-01-22 16:50:12 -08:00
Stanley Tng
61dbd81f6a Add 2 new ways to check for Support for Hearing Aids Profile
The getProfileProxy will return false if Hearing Aids Profile is not
supported. Also the getSupportedProfiles will return the correct support
for Hearing Aids even when Bluetooth is disabled.

Test: Manual testing with configuration enabled and disabled.
Bug: 119617521
Change-Id: I146bd3bc36d4c474f7bca18a05b679fb8e70ca63
2019-01-22 16:46:06 -08:00
Ugo Yu
4a33b88761 Skeleton implementation of Bluetooth metadata APIs
Bug: 121051445
Test: Build pass
Change-Id: I5e80210205b37294b1eb8356502ebf242e627ce4
2019-01-23 07:01:47 +08:00
Arun Mirpuri
cb102fa366 audio: Add API for BT to query offload A2DP encoding formats
Add API in AudioManager to query offload A2DP encoding formats
supported on primary HAL. This can be used instead of reading
from property

Bug: 111812273
Test: make
Change-Id: I168f288d0bf32d6c9733c9b57934084667e794ee
2019-01-17 14:48:27 -08:00
Jack He
17d71033ab Merge "Deprecate BluetoothHealth APIs" am: c792b78f71
am: 672b984fa6

Change-Id: I60d6429fc07cf4a2dccf5773a5c18016523d2762
2019-01-09 21:05:45 -08:00
Jack He
6b73b32c7a Deprecate BluetoothHealth APIs
* Mark all BluetoothHealth related APIs as deprecated
* Make BluetoothAdapter#getProfileProxy(context, BluetoothProfile.HEALTH)
  always return false
* Remove all logic behind BluetoothHealth APIs and add deprecation error log
* Health Device Profile (HDP) and MCAP protocol has been largely
  replaced by BLE. New applications should use Bluetooth Low Energy
  instead of legacy Bluetooth Health Device Profile

Bug: 111562841
Test: make, unit test, use Bluetooth
Change-Id: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892
Merged-In: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892
(cherry picked from commit 2be70a11a2)
2019-01-09 18:09:21 -08:00
Jack He
2be70a11a2 Deprecate BluetoothHealth APIs
* Mark all BluetoothHealth related APIs as deprecated
* Make BluetoothAdapter#getProfileProxy(context, BluetoothProfile.HEALTH)
  always return false
* Remove all logic behind BluetoothHealth APIs and add deprecation error log
* Health Device Profile (HDP) and MCAP protocol has been largely
  replaced by BLE. New applications should use Bluetooth Low Energy
  instead of legacy Bluetooth Health Device Profile

Bug: 111562841
Test: make, unit test, use Bluetooth
Change-Id: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892
2019-01-07 20:10:36 -08:00
Mathew Inwood
8501ae1763 Merge "Limit access to suspected false positives." am: aeda49d185
am: 152d5a5dcd

Change-Id: I8e10322e69d2d479079df5cf8fec0287c7c117f1
2019-01-02 05:00:54 -08:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
bohu
abe91dbc3e bluetooth: fix crash on accessing null adapter
By checking bluetooth adaptor before accessing it,
because it could be null on devices that do not
support bluetooth, such as android emulator.

BUG: 121129248

Test:
lunch sdk_gphone_x86-userdebug
make -j
emulator
launch chrome and it should not crash

Change-Id: Ia75b5ee1efa3a8195056dada079239931eb9d901
2018-12-18 12:30:58 -08:00
Zach Johnson
a0909a416f Merge "Pass package name as part of startDiscovery" am: bee9a87193 am: 683e379471
am: ff44d968eb

Change-Id: I6bfc7638d6f4e3487ece2452743c68150aaaf754
2018-12-13 15:05:09 -08:00
Zach Johnson
ff44d968eb Merge "Pass package name as part of startDiscovery" am: bee9a87193
am: 683e379471

Change-Id: I8dee413204c52bd715403d13696939930220cb10
2018-12-13 14:07:36 -08:00
Zach Johnson
57e6e90204 Pass package name as part of startDiscovery
Test: manual
Bug: 118347252
Change-Id: Icbc2e7e756b16ffd181924b586a0292c2bf32ec5
2018-12-12 20:33:09 -08:00
Myles Watson
18f1d2adc9 Merge "BluetoothManager: Set DBG to false" am: c4ce66dd2f am: 1fe951bf59
am: 64c6700af6

Change-Id: I1b3a38128b6ebee300a72efb306c10462236d4bc
2018-12-03 09:12:03 -08:00
Jakub Pawlowski
e83e0abfe7 Bluetooth: Check descriptors size in BluetoothHidDeviceAppSdpSettings am: 63519217e8
am: 520a94aa47

Change-Id: Ie8dd4e851866092ce6b857707681229f35c1b557
2018-12-03 06:53:34 -08:00
Myles Watson
64c6700af6 Merge "BluetoothManager: Set DBG to false" am: c4ce66dd2f
am: 1fe951bf59

Change-Id: Ia2e6dd5e7670818b9e2d7de920b8a5f4e465e13a
2018-11-30 21:18:37 -08:00
Treehugger Robot
c4ce66dd2f Merge "BluetoothManager: Set DBG to false" 2018-12-01 04:44:09 +00:00
Jakub Pawlowski
520a94aa47 Bluetooth: Check descriptors size in BluetoothHidDeviceAppSdpSettings
am: 63519217e8

Change-Id: I42a61e190fc9c37b8f19623a77b3a16ba924fc70
2018-11-30 00:29:37 -08:00
Jakub Pawlowski
63519217e8 Bluetooth: Check descriptors size in BluetoothHidDeviceAppSdpSettings
Bug: 119819889
Test: compilation
Change-Id: If51d0e2af74d99758f79a603d40cc2f5c84e4dde
2018-11-29 20:44:18 +01:00
Jakub Pawlowski
9676bc2d4d Merge "Bluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord" am: 658e6530ba am: 591a68a5a1
am: 587a8acb6c

Change-Id: I88459ae16e0492ea877983252aae03ad5714a306
2018-11-29 00:39:27 -08:00
Jakub Pawlowski
587a8acb6c Merge "Bluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord" am: 658e6530ba
am: 591a68a5a1

Change-Id: I3c8f931cfea06e44853bd21ffd237562b4f45677
2018-11-29 00:22:00 -08:00
Jakub Pawlowski
4c2aa61202 Bluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord
Bug: 118805852
Test: compilation
Change-Id: I537bec61cd3e7df700cc972683458f977ff370b8
2018-11-29 07:20:53 +00:00
Benson Li
3328a2ca25 Merge "HFP: Send caller ID in +CLIP command (1/4)" am: 6c4c8aeb70 am: d09c0d88e4
am: 66ba8e8dbc

Change-Id: I1ecad6c8d3defd67fd06cb25c32243cd7c4f80a3
2018-11-21 13:39:39 -08:00
Benson Li
66ba8e8dbc Merge "HFP: Send caller ID in +CLIP command (1/4)" am: 6c4c8aeb70
am: d09c0d88e4

Change-Id: Ic628b5d6b3e4062388523f008ad4257c27bae71d
2018-11-21 13:22:43 -08:00
Treehugger Robot
6c4c8aeb70 Merge "HFP: Send caller ID in +CLIP command (1/4)" 2018-11-21 20:21:19 +00:00
Hansong Zhang
af3d69b258 Merge "BluetoothDevice.ACTION_UUID requires BLUETOOTH_ADMIN" am: 215a48cff4 am: 652dffda0b
am: a7063f1830

Change-Id: Ib879f947b1db9579ec46efc79351a3b9247c09c8
2018-11-20 18:35:26 -08:00
Hansong Zhang
a7063f1830 Merge "BluetoothDevice.ACTION_UUID requires BLUETOOTH_ADMIN" am: 215a48cff4
am: 652dffda0b

Change-Id: I7ea71f54d211bf4656472b9a40cd6996507eaa18
2018-11-20 18:23:10 -08:00
Treehugger Robot
215a48cff4 Merge "BluetoothDevice.ACTION_UUID requires BLUETOOTH_ADMIN" 2018-11-21 01:58:32 +00:00
Stanley Tng
a944152a99 Merge "Enable the Debug Logs for Hearing Aids Profile" am: 7271c452a9 am: b6987e3c3c
am: 56f272547f

Change-Id: I1a664cf14d7f132abb9919fb3ba11d111fbb1e7b
2018-11-20 17:55:08 -08:00
Stanley Tng
56f272547f Merge "Enable the Debug Logs for Hearing Aids Profile" am: 7271c452a9
am: b6987e3c3c

Change-Id: I4708bea946177b47beb78845a49f082df96e7ede
2018-11-20 17:43:46 -08:00
Stanley Tng
420a0eb576 Enable the Debug Logs for Hearing Aids Profile
Bug: 119617521
Test: Compile
Change-Id: I40de1fcb3ca9e0ee66b4650a161f3735722df7ed
2018-11-15 10:22:07 -08:00