Commit Graph

1682 Commits

Author SHA1 Message Date
Treehugger Robot
3d0dca5cab Merge "Bluetooth: MCE: Add new API to set message read status or deleted status" am: ab98549022 am: 5cdec2e9d1 am: e63b8e9c80 am: 3b61eb972d am: 411a126070
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1212983

Change-Id: Ibd790358305b25a922a0ffe6e4b1323a90759022
2020-07-14 22:29:10 +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
3fbe3564c3 Merge "Add debug log for set/remove active device." am: cbb4cd1f8c am: 1466c82f13 am: 24c414d9e5 am: a47b3f1ace am: d7cd0e2bb0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1351257

Change-Id: I66e6f219b8e4ab98a62eea2cd64de027f0810f0f
2020-07-09 03:50:43 +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
Makoto Onuki
4290301e85 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.

Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
2020-06-23 10:51:50 -07:00
Treehugger Robot
fb458a8894 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" am: bdc57bef81 am: bb606cfc11 am: adeef01787 am: 4d88d35930 am: 850eb90b0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1207444

Change-Id: Ie107709fe30d2c7aa07491eaef77ec1839eb7696
2020-06-22 18:39:19 +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
Myles Watson
d4a13f56d8 Bluetooth: Add pairing initiator extra
Remember if the pairing app was in the foreground.

Bug: 150156492
Test: pair two devices, unpair on one device, try to reconnect
Change-Id: I6f564857974146e0c18134648eb1e297e8afbc6f
2020-06-13 14:09:16 +00:00
Lee Shombert
99e9f58e24 Create a binder cache for IBluetooth.getConnectionState
Bug: 157935587

This adds a binder cache for the IBluetooth.getConnectionState() method.
There is no change in bluetooth functionality.

Each atest is run twice.  Once with the code to be committed and once
with a special build that sets PropertyInvalidatedCache DEBUG and VERIFY
to true.  In the latter case, the test passes if the atest passes and if
there are no errors from the cache verification.

Tag: #feature

Test: atest BluetoothInstrumentationTests

Test results are
  Passed: 479, Failed: 0, Ignored: 4, Assumption Failed: 75

Change-Id: I2946297ffab557877dc7ec56206834d7c3776662
2020-06-08 11:25:15 -07:00
Treehugger Robot
6711ea61d1 Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" am: 9b128b9d1b am: 434d64e4a1 am: bbd3af4d38 am: ca6fd6265d am: 25cb277dff
Change-Id: I9975be2325ce653858943282391d0b7866a4e0ff
2020-05-18 18:52:51 +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
6bf8181fb3 Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev am: 1c85c4501b am: ea25bab747 am: a2cdf90fe3 am: 70c72589aa
Change-Id: I3efb098573ec4f843ca26dc526c5360083e8aed0
2020-05-04 07:55:24 +00:00
Hungyen Weng
a2cdf90fe3 Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev am: 1c85c4501b am: ea25bab747
Change-Id: I1d08ff568dab3cca47c6841f58b0d4e024cf9e8c
2020-05-04 07:17:20 +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
b6c9ed89a2 Merge "BluetoothProfileConnecter now calls the ServiceListener's onServiceDisconnected method after unbinding the service" into rvc-dev am: 248896bf98 am: d3d0f2a76d am: f0f934cb98 am: f72ca3ba12
Change-Id: Iac47dccd76d8f1e0b3952ea892b3bc550a318ec0
2020-05-03 06:23:05 +00:00
Rahul Sabnis
f0f934cb98 Merge "BluetoothProfileConnecter now calls the ServiceListener's onServiceDisconnected method after unbinding the service" into rvc-dev am: 248896bf98 am: d3d0f2a76d
Change-Id: If4b31c82c07f9b75b4eddb1f34c77a2a6affc4c6
2020-05-03 05:50:23 +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
01628ba180 Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests
Bug: 136595429
Change-Id: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Exempt-From-Owner-Approval: Merge from AOSP
2020-04-21 21:46:34 +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
303cf24280 Merge "Fix exception handling in getState() binder cache" into rvc-dev am: 6e17bc7fae am: 3bfe58bd5e
Change-Id: I68d37b6591f6725a0dfba4ddefafe80a197ecf28
2020-04-16 16:26:15 +00: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
ae22de6111 Merge "Revert "Fix exception handling in getState() binder cache"" into rvc-dev am: 58de85c41e am: 409b13dbb0
Change-Id: If3ec8be83ba651313b2564776ca87245d5af7aa5
2020-04-09 00:25:28 +00: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
Treehugger Robot
bb3874364f Merge "Independent methods to enable/disable BLE mode" 2020-03-30 01:20:19 +00:00
Treehugger Robot
3e831d99fc Merge "BluetoothHearingAid System APIs now throw an exception if a null BluetoothDevice is passed in" am: 364534c3d2 am: 7563cf27cf
Change-Id: I556936b79c86cb960b17a2b864c05351a7894eaf
2020-03-26 10:41:01 +00:00
Treehugger Robot
364534c3d2 Merge "BluetoothHearingAid System APIs now throw an exception if a null BluetoothDevice is passed in" 2020-03-26 10:07:30 +00:00
Rahul Sabnis
eb5712abd2 BluetoothHearingAid System APIs now throw an exception if a null
BluetoothDevice is passed in

Bug: 149238489
Test: Manual
Merged-In: I594f558bfe1e286bf74dd8dc3db4c8497fd0a025
Change-Id: I594f558bfe1e286bf74dd8dc3db4c8497fd0a025
2020-03-25 13:50:36 -07:00
TreeHugger Robot
e228bc0b61 Merge "BluetoothHearingAid System APIs now throw an exception if a null BluetoothDevice is passed in" into rvc-dev am: fc099117fc
Change-Id: I1f8863a291515441a410f1c5339b7eb3eef46cda
2020-03-25 13:42:54 +00:00
Ugo Yu
644a6d52a6 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-25 17:47:19 +08:00
Rahul Sabnis
4a55841ae5 BluetoothHearingAid System APIs now throw an exception if a null
BluetoothDevice is passed in

Bug: 149238489
Test: Manual
Change-Id: I594f558bfe1e286bf74dd8dc3db4c8497fd0a025
2020-03-24 17:57:30 -07:00