Commit Graph

1335 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
Myles Watson
3ee31a7ac6 BluetoothManager: Set DBG to false
Fixes: 71491860
Test: Pair and connect with a phone
Change-Id: I3ead8154765267105c74cd800f571933bbe82e07
2018-11-15 13:58:42 +00:00
Hansong Zhang
ff1c21c94c BluetoothDevice.ACTION_UUID requires BLUETOOTH_ADMIN
Fix the doc - intent BluetoothDevice.ACTION_UUID requries
android.Manifest.permission#BLUETOOTH_ADMIN instead of #BLUETOOTH to
receive. This is already enforced by Bluetooth service.

Bug: 113160320
Test: manual
Change-Id: I977d58e6d534f512da80bd6b13bebb515765626f
2018-11-12 14:33:59 -08:00
Benson Li
1d4f64ac7c HFP: Send caller ID in +CLIP command (1/4)
* Modify BluetoothHeadset so that phoneStateChanged method can
  provide caller display name

Bug: 111378831
Test: runtest bluetooth, runtest -x BluetoothPhoneServiceTest.java
Change-Id: Ibc3611a50ec9f103fd235dde606ecbd10657e014
2018-11-09 20:11:04 +00:00
TreeHugger Robot
022cf30d17 Merge "Be the current user to get A2DP proxy" into pi-dev 2018-10-30 22:22:14 +00:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

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

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Ajay Panicker
9020cf9a48 Merge "Synchronize on a static final object to lock mDeviceBusy" am: 34f9a3e9e9
am: 56d37b7c43

Change-Id: Ic53518b0e62803bb68b60ed318d6a0825b192164
2018-10-18 23:34:44 -07:00
Ajay Panicker
6c96b70195 Synchronize on a static final object to lock mDeviceBusy
Synchronizing on a field doesn't lock the object in a predictable way.

Bug: 63389270
Test: Compile
Change-Id: Idd3111bc94d32bc4bb320a5c25da37fe68276337
2018-10-17 18:20:51 +00:00
Jack He
94405bb133 Merge "Remove BluetoothDevice.ACTION_DISAPPEARED" am: 2ac8c8a3e2
am: 24591d2641

Change-Id: Idc687ad7ea25b793f5ef12612e161e197d87679d
2018-10-12 11:18:09 -07:00
Nan Zhang
55581d99b5 Fix the incorrect javadoc links
A lot of unresolved link errors showing up after go/ag/5172152.

Test: m -j docs with -lerror enabled
Bug: b/116163454
Change-Id: I74d1f75e0f00015410a63e13103c28a9c84b4fe0
2018-10-11 17:54:36 -07:00
Jack He
097a89513e Remove BluetoothDevice.ACTION_DISAPPEARED
This intent was never sent by the Bluetooth stack

Fixes: 112115770
Test: make
Change-Id: Iaf71aeafa21f44ec9b59c1b766c936ab7dde39f1
2018-10-11 21:06:29 +00:00
kopriva
003587b9a4 docs: fixing errors found with lint checker
am: 219f7dcb66

Change-Id: Id38a4b2e21285d5d5e2a2124d76885febd3441c6
2018-10-09 18:30:57 -07:00
kopriva
219f7dcb66 docs: fixing errors found with lint checker
through /bluetooth directory

amending through /content directory

Test: make ds-docs

Bug: 117494359

Change-Id: I751e15d60f0b9cc441998b27560050bf62994fef
Exempt-From-Owner-Approval: Docs-only change
2018-10-09 16:01:04 -07:00
Andrew Solovay
d10e384d6c resolve merge conflicts of a3e34fe9fe to pi-dev-plus-aosp
Bug: None
Test: Eyeballed (comment-only change).
Change-Id: Ia644cde66376b2bddeb27bb2a147b3266037aa2c
Exempt-From-Owner-Approval: Docs-only change
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 22:50:39 +00:00
Andrew Solovay
a44f2c075b docs: Replacing {#link with {@link
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.

Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.

Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.

Staged to:

go/dac-stage/reference/android/app/Instrumentation.html
go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html
go/dac-stage/reference/android/bluetooth/BluetoothDevice.html
go/dac-stage/reference/android/bluetooth/BluetoothServerSocket.html
go/dac-stage/reference/android/inputmethodservice/InputMethodService.html
go/dac-stage/reference/android/view/KeyCharacterMap.html
go/dac-stage/reference/android/view/KeyEvent.html
go/dac-stage/reference/android/media/AudioManager.html
go/dac-stage/reference/android/net/wifi/WifiConfiguration.html

(Other files were not in the public Javadocs.)

Bug: 111925950
Test: make ds-docs
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 18:20:51 +00:00
Vasu Nori
694752d5b9 Add hidden API to return "Uploading" bit value from SDP record's MapSupportedFeatures.
Bug: 111614861
Test: tested w/ KitchenSink App
Change-Id: I43895183d7b315f57257e1d2045f17dedcb0cfcd
2018-09-25 21:39:31 +00:00
Treehugger Robot
0677766615 Merge "Unhide the LE CoC APIs" 2018-09-18 18:31:26 +00:00
Stanley Tng
1bff4bab9a Unhide the LE CoC APIs
Expose the LE Connection-oriented Channels APIs for applications to use.

Test: Run the SL4A ACTS test: BleCocTest
Bug: 70683224
Change-Id: I68128bc7154966ec065091c973351f8892da9b4d
2018-09-13 13:46:39 -07:00