Commit Graph

1689 Commits

Author SHA1 Message Date
Jakub Pawlowski
eec09803da Merge "Add LE Audio UUID placeholder" 2020-12-15 21:54:45 +00:00
Jakub Pawlowski
224146d50d Add LE Audio UUID placeholder
Actual value will will be added in the future. We already have to
reference it in the source.

Bug: 150670922
Test: compilation
Tag: #feature
Sponsor: jpawlowski@
Change-Id: I3ba1e0e1136346e469952568f5a409cf32b898be
2020-12-15 09:09:31 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Myles Watson
89bf39528f BluetoothClass: Use mask to get MajorDeviceClass
Bug: 174650196
Test: compiles
Change-Id: I6042a02fa329c5291aa7b9719907485e748582bf
2020-12-02 20:48:08 -08:00
Grzegorz Kołodziejczyk
f08f986a9b Add Bluetooth LE Audio Profile (3/3)
This is boilerplate code for Bluetooth LE Audio profile

Bug: 150670922
Test: compilation
Tag: #feature
Change-Id: Iadc3af12fd8b2808db2f4e933a1906a819824ade
2020-12-01 23:30:49 +01:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Treehugger Robot
917b0a4488 Merge "Introduce a BluetoothConnectionCallback that will fire off events when a device is connected or disconnected." 2020-10-30 02:34:25 +00:00
Rahul Sabnis
79ce82f840 Introduce a BluetoothConnectionCallback that will fire off events when a
device is connected or disconnected.

Tag: #feature
Bug: 171902843
Test: Manual
Change-Id: I194a35a69fe0c5d960ea88a1a0fa52c8df7738e2
2020-10-29 16:51:26 -07:00
Treehugger Robot
5ba504f179 Merge "Move all BluetoothCodecConfig and BluetoothCodecStatus APIs moved from the non-SDK API list to the blocklist in Android 11 back to the non-SDK API list." 2020-10-28 19:44:40 +00:00
Rahul Sabnis
57835f979c Move all BluetoothCodecConfig and BluetoothCodecStatus APIs moved from
the non-SDK API list to the blocklist in Android 11 back to the non-SDK
API list.

Tag: #feature
Bug: 168812851
Test: atest BluetoothHostTest#testCodecMethodsAccessible
Merged-In: I29983284b1a1c271d983c99b286e204604abdc72
Change-Id: I29983284b1a1c271d983c99b286e204604abdc72
2020-10-28 18:35:25 +00:00
Jakub Pawlowski
9b46151ead Bluetooth: make it possible to advertise service solicitation UUID
Bug: 159827149
Tag: #feature
Test: called the API in test app, verified advertisement content
Change-Id: I3ab43e39bb7fd8fef97e141eeb981419aa3ec35a
2020-10-08 07:26:01 +00:00
Myles Watson
70b5ba179c Bluetooth: Spell mandatory correctly
Bug: 169654068
Test: compilation
Change-Id: Ibb0046180760e27d6991ae17849a7405738b6f01
2020-10-05 11:23:24 -07:00
Jakub Pawlowski
2c1d2c21cf Make BluetoothGattCallback.onServiceChanged public
Bug: 154056389
Test: proper CTS test will be provided
Change-Id: I2c9264910b65d62124c75c3ee3fd0b5bd18a2006
2020-09-26 15:50:37 +00:00
HsingYuan Lo
762a05f057 Expose service changed event to application (2/3)
Handle service changed event from GattService

Bug: 154056389
Tag: #feature
Test: test service changed scenario
Change-Id: If56dcbd7cf17b23c88cceb9c67c5d75b21320965
2020-09-24 09:27:58 +08:00
Treehugger Robot
cf44a015e8 Merge "Add action for Bluetooth tethering state changed" 2020-09-17 02:01:00 +00:00
Ted Wang
47558ca2b2 Add action for Bluetooth tethering state changed
Add new action for Bluetooth tethering state changed and extra for
broadcasting Bluetooth tethering state changed.

Tag: #feature
Bug: 138688805
Test: Manual
Change-Id: Ie0f848448f9717a6a1233d0dbb0785da7d30dc81
2020-09-16 10:31:25 +08:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Zach Johnson
f2a8b85026 Remove listenUsingEncryptedRfcommOn & listenUsingScoOn
both are hidden and not @UnsupportedAppUsage, so are safe to remove

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I58acb4160207fc0eeaeb7875bfd61f3bd442ad9a
2020-08-19 16:53:06 -07:00
Alice Kuo
9922d8cc9d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

#inclusivefixit

Bug: 161896447
Test: NA (Comment only)

Change-Id: Id4f72f98d5a5def26d42d112aeb1b67217d38af0
2020-07-29 04:00:34 +00:00
Treehugger Robot
e63b8e9c80 Merge "Bluetooth: MCE: Add new API to set message read status or deleted status" am: ab98549022 am: 5cdec2e9d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1212983

Change-Id: Ie09a4b1e54288b88bc829c6713172c1dbe1608a2
2020-07-14 21:39:51 +00:00
Treehugger Robot
ab98549022 Merge "Bluetooth: MCE: Add new API to set message read status or deleted status" 2020-07-14 21:05:46 +00:00
Treehugger Robot
24c414d9e5 Merge "Add debug log for set/remove active device." am: cbb4cd1f8c am: 1466c82f13
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1351257

Change-Id: I55b4b2f1296628228d36ed4259f08178b1a01d56
2020-07-09 03:14:48 +00:00
weichinweng
f6ec2d07e2 Add debug log for set/remove active device.
Bug: 160746277
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I3decaa102345d9e9485882cfeee2fae203264e25
2020-07-08 03:41:32 +00:00
Fei Zheng
bc5eaa9e36 Bluetooth: MCE: Add new API to set message read status or deleted status
Bug: 146314855
Test:
1. Pair with a remote device which address is like 00:01:02:03:04:05
2. On remote device allow MAP connection
3. Make sure there is at least 1 unread message in last week on remote device
4. adb shell am instrument -w -e mce_set_message_status_iterations 1 -e device_address
 00:01:02:03:04:05 -e class android.bluetooth.BluetoothStressTest#testMceSetMessageStatus
 com.android.bluetooth.tests/android.bluetooth.BluetoothTestRunner

Change-Id: I7a3e337142bc39a55c1bfd425e0966e1fb1b9a68
2020-06-26 07:27:35 +08:00
Makoto Onuki
a11035a7eb Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Exempt-From-Owner-Approval: Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: I36e3562b72e64b51e4febd1d42a3bc8e4dc60988
2020-06-24 20:49:20 +00:00
Makoto Onuki
42bec243c0 Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Exempt-From-Owner-Approval:Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
2020-06-24 18:02:10 +00:00
Treehugger Robot
adeef01787 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" am: bdc57bef81 am: bb606cfc11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1207444

Change-Id: I0e6cab7597bbdf12292feb7c5b8a03bcd05df7f8
2020-06-22 17:59:33 +00:00
Treehugger Robot
bdc57bef81 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" 2020-06-22 17:22:54 +00:00
Treehugger Robot
bbd3af4d38 Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" am: 9b128b9d1b am: 434d64e4a1
Change-Id: I9cb189ffb7df29be2ae97de220ed03937eb19d40
2020-05-18 17:26:20 +00:00
Treehugger Robot
434d64e4a1 Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" am: 9b128b9d1b
Change-Id: I39ded23183483f8791d8a6ea8b474b5c72a7b2eb
2020-05-18 17:07:02 +00:00
Treehugger Robot
9b128b9d1b Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" 2020-05-18 16:51:02 +00:00
Jakub Pawlowski
f4d2f6c50c BluetoothLeScanner: clarify the documentation for permission requirements for startScan
Bug: 145153879
Change-Id: I698952f67cfc97a33b703096cbba65129a91c220
2020-05-13 17:55:53 +00:00
Hungyen Weng
bacc6cd08c Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev am: 1c85c4501b
Change-Id: I12ad1c145a368be02b68b83e4568149cc7703202
2020-05-04 07:04:23 +00:00
Hungyen Weng
ba5692ea72 Revert "BluetoothProfileConnecter now calls the ServiceListener'..."
Revert submission 11348591-btmap-close-gts

Reason for revert: Droidcop reverted the change due to test failure, Test failed. https://android-build.googleplex.com/builds/tests/view?invocationId=I05500004181087103&testResultId=TR42507671126333727

Reverted Changes:
I324b4ea66:BluetoothProfileConnecter now calls the ServiceLis...
I1427f1a86:Add GTS test for BluetoothMap#close

Bug: 155587865

Change-Id: I9a2645c7bbaec9fdf0c6f5972b08ba70cfe78741
2020-05-04 04:53:46 +00:00
Rahul Sabnis
5c59886603 Merge "BluetoothProfileConnecter now calls the ServiceListener's onServiceDisconnected method after unbinding the service" into rvc-dev am: 248896bf98
Change-Id: Ie116fbc7de03081640d4470c6d23e7b526136279
2020-05-03 05:33:17 +00:00
Rahul Sabnis
ee31c78cb8 BluetoothProfileConnecter now calls the ServiceListener's
onServiceDisconnected method after unbinding the service

Bug: 155120232
Test: atest BluetoothHostTest#testMapClose
Change-Id: I324b4ea6654261eb67d5ec184f6b3456ba3d1aa4
2020-05-01 15:39:47 -07:00
Philip P. Moltmann
e777a902f2 Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b am: c5299c7c3a
Change-Id: I099944752fc3006c1e98750dd46dbebf5e50789f
2020-04-22 15:19:14 +00:00
Philip P. Moltmann
c5299c7c3a Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b
Change-Id: I3ddd8954cf8443f549f7965cc43f2600bf92a80b
2020-04-22 15:09:28 +00:00
Philip P. Moltmann
6bb9c7bdc4 Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests TetheringTests:TetheringServiceTest
Bug: 136595429
Merged-In: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Change-Id: Ic3d937e7bb5141798234ed5b2852c1f768e97495
2020-04-20 18:00:03 -07:00
Lee Shombert
9cd38fb1f3 Merge "Fix exception handling in getState() binder cache" into rvc-dev am: 6e17bc7fae
Change-Id: I802d4f142b71b215ef302a7a007e28d8a034f715
2020-04-16 16:07:19 +00:00
Lee Shombert
6d1fa6f65a Fix exception handling in getState() binder cache
Bug: 153103051

A binder cache recompute() function cannot compute a result based on any
data that is not known to the binder server.  If the code depends on
local data that can change, then invalidation will not work properly.

The original getState() method returned OFF if the bluetooth service was
unavailable.  This computation now occurs in the getStateInternal()
method, outside of the binder cache query() method.

The recompute() method converts RemoteExceptions to RuntimeExceptions.
Then, the conversion is reversed in getStateInternal().  This double
conversion is needed because the cache recompute() method has no throw
spec.

Test: Create a debug image that enables binder cache VERIFY.  Run the
following tests:
 * atest BluetoothInstrumentationTests
 * atest PtsChreTestCases
 * atest UserLifecycleTests
 * manual testing connecting to bluetooth devices and toggling airplane
   mode.
No cache inconsistencies found.  No test failures seen.

Change-Id: I93b9742587c4eb695d9a11fc6ab145f6a40a0ece
2020-04-15 13:58:55 -07:00
TreeHugger Robot
6c78d1078b Merge "Revert "Fix exception handling in getState() binder cache"" into rvc-dev am: 58de85c41e
Change-Id: I1c5ba5ca6864051581a594551b12015c462462bf
2020-04-09 00:11:45 +00:00
Lee Shombert
2a8802d2ca Revert "Fix exception handling in getState() binder cache"
This reverts commit 81a3e1c578.

Bug: b/153505953

Change-Id: I58c46e534ccadf332d10fff8f99c85ad24340c27
2020-04-08 21:12:52 +00:00
Lee Shombert
e46da26d89 Merge "Fix exception handling in getState() binder cache" into rvc-dev am: 773cc6249e
Change-Id: I6ae7601efafdca3df5f1bdc6897a2796d3ef7fa8
2020-04-07 16:25:31 +00:00
Lee Shombert
81a3e1c578 Fix exception handling in getState() binder cache
Bug: 153103051

A binder cache query function cannot compute a result based on any data
that is not known to the binder server.  If the code depends on local
data that can change, then invalidation will not work properly.

The getState() method returns OFF if the bluetooth service is
unavailable.  This computation now occurs in the getState() method,
outside of the binder cache query() method.

The query method converts RemoteExceptions to RuntimeExceptions.  Then,
the conversion is reversed in getState().  This double conversion is
needed because the cache query() method has no throw spec.

Test: Run 'atest BluetoothInstrumentationTests' with a special debug
image that enables binder cache VERIFY.  The test found no cache
inconsistencies.

Change-Id: I80db86f66d8b51fa94207824c8b15972a9066ef5
2020-04-06 18:07:33 -07:00
Treehugger Robot
10a2b079b0 Merge "Independent methods to enable/disable BLE mode" am: bb3874364f am: df9658720b
Change-Id: Ie3373dda0c8d92aafdbf85d228d5596e584720ef
2020-03-30 01:52:54 +00:00
Treehugger Robot
d378d8fcd1 Merge "Independent methods to enable/disable BLE mode" am: bb3874364f am: df9658720b
Change-Id: I0cdfc70669f8a08f47895c2642a119b71551b619
2020-03-30 01:52:40 +00:00
Ugo Yu
f845259eec Independent methods to enable/disable BLE mode
* Use IBluetoothManager.enableBle() and disableBle() to toggle BLE only
  mode instead of updateBleAppCount() then enable().
* Fix BluetoothAdapter.disableBle sometime won't disable Bluetooth.
* Add active log if Bluetooth is disabled via disableBle().

Bug: 139454316
Test: enableBle() -> disableBle() and check Bluetooth is OFF.
Change-Id: I173d5fed1b47ff68a6504741e25754e65cbd1455
2020-03-30 09:38:54 +08:00