Commit Graph

1502 Commits

Author SHA1 Message Date
Treehugger Robot
88fba38a1c Merge "BluetoothA2dpSink System APIs now require BLUETOOTH_ADMIN permission" 2020-02-10 23:16:52 +00:00
Rahul Sabnis
eaa088f14b BluetoothA2dpSink System APIs now require BLUETOOTH_ADMIN permission
Bug: 149216030
Test: Manual
Change-Id: Ib28c7f3133eb96c1ba0b43c8b140babde699d5f4
2020-02-10 14:02:25 -08:00
Rahul Sabnis
b0a9a5dfac Update BluetoothPbap class description to indicate how to create an
instance of the class, add intdef to return value of
BluetoothPbap#getConnectionState, and move all SystemApis to require
the BLUETOOTH_PRIVILEGED permission

Bug: 148966894
Test: Manual
Change-Id: I4a798b0a16ab839f2047fc58f21c420cc99b6db6
2020-02-07 17:21:21 -08:00
Rahul Sabnis
966cef37c2 BluetoothAdapter#connectAllEnabledProfiles and
BluetoothAdapter#disconnectAllEnabledProfiles updated to require
BLUETOOTH_PRIVILEGED permission and update documentation to indicate
connection and disconnection is asynchronous

Bug: 147321746
Test: Manual
Change-Id: I961f02a539a247b1397ce4f478b9dc804d9973ab
2020-02-05 16:37:18 -08:00
Rahul Sabnis
99507b5eb3 Change data type of duration param from int representing seconds to long
representing milliseconds in BluetoothAdapter#setScanMode

Bug: 144380530
Test: Manual
Change-Id: I76528478a64d22afefd4ec964d1a78295dd3c94f
2020-02-04 14:29:09 -08:00
Treehugger Robot
7a028c7f5b Merge "Add privileged permission to SystemApi BluetoothDevice#setAlias" 2020-02-01 23:37:34 +00:00
Treehugger Robot
f0f3a0f48e Merge "Add new API BluetoothAdapter#removeActiveDevice to replace calls to BluetoothAdapter#setActiveDevice with a null device" 2020-02-01 23:27:10 +00:00
Treehugger Robot
ea711aba95 Merge "Revert value of BluetoothDevice.ACTION_ALIAS_CHANGED back to android.bluetooth.device.action.ALIAS_CHANGED from android.bluetooth.action.ALIAS_CHANGED" 2020-02-01 22:21:27 +00:00
Rahul Sabnis
e75a016d1b Revert value of BluetoothDevice.ACTION_ALIAS_CHANGED back to
android.bluetooth.device.action.ALIAS_CHANGED from
android.bluetooth.action.ALIAS_CHANGED

Bug: 146158681
Test: Manual
Change-Id: Ie247568ff3e5a750d74f22636aca69e3e74a55f5
2020-01-31 10:38:02 -08:00
Rahul Sabnis
e6f17155da Add new API BluetoothAdapter#removeActiveDevice to replace calls to
BluetoothAdapter#setActiveDevice with a null device

Bug: 147428526
Test: Manual
Change-Id: I838448a504515d5a8b1eec254ccc1d9414239475
2020-01-30 16:59:02 -08:00
Rahul Sabnis
f93a469cec Add BLUETOOTH_PRIVILEGED permission to SystemApi
BluetoothHidDevice#setConnectionPolicy

Bug: 148597061
Test: Manual
Change-Id: I03875cb71483d3d6e18795324a7fbea6681fb9b0
2020-01-30 13:49:35 -08:00
Rahul Sabnis
98c6c7c4c9 Add privileged permission to SystemApi BluetoothDevice#setAlias
Bug: 144792904
Test: Manual
Change-Id: Ie11109736bb0eb4cd0f06c38db44805c0169ac5f
2020-01-30 12:02:17 -08:00
Rahul Sabnis
791dedb43f Add api BluetoothAdapter.getMostRecentlyConnectedDevices() to be able to
get connected devices ordered by how recently they were connected

Bug: 130984590
Test: Manual
Change-Id: Ie5d0c7a8e6bc5daad5ff14064b0c65b7c4c5e6b0
2020-01-29 11:53:10 -08:00
Hansong Zhang
a0b7355a6f Bluetooth LE COC: Delete unused testing API
Some methods are for SL4A test only, and now they have been migrated.

Test: compile
Change-Id: I86e22814fc9a3fd296c359804a465b9ead4d926f
2020-01-24 21:26:07 +00:00
Treehugger Robot
4328fba884 Merge "Use @ConnectionPolicy annotation more consistently in classes with methods setConnectionPolicy and getConnectionPolicy" 2020-01-23 04:20:53 +00:00
Rahul Sabnis
30c597ffb0 Use @ConnectionPolicy annotation more consistently in classes with
methods setConnectionPolicy and getConnectionPolicy

Bug: 147669289
Test: Manual
Change-Id: I2b9b0391a02d01623c1cd253f2da12b2baaea599
2020-01-22 23:08:21 +00:00
Treehugger Robot
23deb3367f Merge "Add @RequiresPermission annotation to SystemApis in BluetoothPan, open up close method as a SystemApi, and BluetoothPan class now implements AutoCloseable and CloseGuard" 2020-01-22 21:09:47 +00:00
Treehugger Robot
b4dbfff366 Merge "Add error log to BluetoothAdapter.factoryReset() and make BluetoothAdapter.getUuids() marked with @Nullable" 2020-01-22 21:09:39 +00:00
Rahul Sabnis
dc125268fb Add @RequiresPermission annotation to SystemApis in BluetoothPan, open
up close method as a SystemApi, and BluetoothPan class now implements
AutoCloseable and CloseGuard

Bug: 146045934
Test: Manual
Change-Id: Iafb2157d67ae4f8e3d7d97cf4198f2978e391a8c
2020-01-22 11:30:59 -08:00
Rahul Sabnis
a079dc7984 Make certain BluetoothProfile constants being used by CarBluetoothTest
into @SystemApi

Bug: 146663105
Test: Manual
Change-Id: Ic474a85c17b69c71cf24b06d0262c13b3b8142fe
2020-01-21 15:11:22 -08:00
Rahul Sabnis
d3dd01190c Add error log to BluetoothAdapter.factoryReset() and make
BluetoothAdapter.getUuids() marked with @Nullable

Bug: 144765076
Test: Manual
Change-Id: I2a38fbb2256177ad29e2739ccbec8c13aae9df6a
2020-01-17 15:09:44 -08:00
satayev
e1432f59ee Merge "Use new UnsupportedAppUsage annotation." 2020-01-13 13:09:36 +00:00
Treehugger Robot
7de3328d4e Merge "Make the BluetoothMap class @SystemApi" 2020-01-10 20:53:20 +00:00
Treehugger Robot
06410db097 Merge "Add setConnectionPolicy to HidDevice and Pan. Clean up documentation for the method in Pbap." 2020-01-10 20:19:36 +00:00
Artur Satayev
76c1d9d5e1 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I6ab53570aca580fbee1fcc927871caa09780f58f
Merged-In: I6ab53570aca580fbee1fcc927871caa09780f58f
2020-01-10 17:02:03 +00:00
Rahul Sabnis
eccd5bdbb7 Make the BluetoothMap class @SystemApi
Bug: 146462547
Test: Manual
Change-Id: I2bd3fbb058019bbb32472eac4fcaa65677cbf950
2020-01-09 17:00:56 -08:00
Rahul Sabnis
43203a8bf8 Add setConnectionPolicy to HidDevice and Pan. Clean up documentation for
the method in Pbap.

Bug: 147444905
Test: Manual
Change-Id: I308b29d8ce96f9e410a66d59379a731ae12e0478
2020-01-09 16:28:19 -08:00
Chienyuan
2fca55dee2 Support PBAP for get/close profile proxy
Bug: 147078847
Test: manual

Change-Id: Iabcf9ab81b052be8f6f7388843681450a1cd7da4
2020-01-08 19:43:27 +08:00
Treehugger Robot
5e7e617e17 Merge "Make the BluetoothHidHost class @SystemApi" 2020-01-08 02:43:18 +00:00
Rahul Sabnis
9913cb52cf Make the BluetoothHidHost class @SystemApi
Bug: 146462547
Test: Manual
Change-Id: I2044e850583701173b51ca89e30ff8aa79bb255c
2020-01-07 17:02:22 -08:00
Rahul Sabnis
e36a171b23 Add setConnectionPolicy to BluetoothPbap
Bug: 145943634
Test: Manual
Change-Id: I72fc624d5c6578ca0374a1e943810d97b6361250
2020-01-06 15:22:55 -08:00
Treehugger Robot
7d48a4513c Merge "Remove unused BluetoothHearingAid APIs and usages" 2020-01-02 20:43:57 +00:00
Treehugger Robot
f14e2e1e1a Merge "Resolve BluetoothA2dpSink APIs used by Settings" 2019-12-17 02:31:59 +00:00
Treehugger Robot
a33dfe1e7b Merge "Refactor BluetoothPbap APIs used by Settings" 2019-12-17 01:53:24 +00:00
Rahul Sabnis
ea2e20c857 Remove unused BluetoothHearingAid APIs and usages
Bug: 143244535
Test: Manual
Change-Id: I8915ec755794b2c44412386de03c5fc0778d8ec7
2019-12-16 16:41:33 -08:00
Treehugger Robot
775540c6d6 Merge "Pipe featureId from app to noteOp in BT code" 2019-12-14 17:36:47 +00:00
Rahul Sabnis
b4d383db15 Resolve BluetoothA2dpSink APIs used by Settings
Bug: 146082017
Test: Manual
Change-Id: Iebae62408c490cb9091b1f4e4a5a5e32321e2700
2019-12-13 14:52:55 -08:00
Philip P. Moltmann
22209940e8 Pipe featureId from app to noteOp in BT code
FeatureIds are not yet available, hence in BTManager we assume always a
"null" featureId.

The effect of this change is that for apps that opt into using
featureIds, they will have one BluetoothAdapter per feature, not one per
process as before. In my testing this caused no problem. Most apps
won't use featureIds, hence for most apps there is no change in
behavior.

Test: used bluetooth
Bug: 136595429
Change-Id: Ic40326ea331c60f764f213bb2673cb4c49a81604
2019-12-13 10:49:16 -08:00
Treehugger Robot
a83641557b Merge "Resolve BluetoothHearingAid API usages by Settings" 2019-12-13 18:15:36 +00:00
Rahul Sabnis
d32a94d224 Resolve BluetoothDevice hidden API usages by Settings
Bug: 143245666
Test: Manual
Change-Id: Id34eb275f604e61330aeb91401dc31aeca666b8f
2019-12-11 11:37:05 -08:00
Rahul Sabnis
5e298ac413 Refactor BluetoothPbap APIs used by Settings
Bug: 145943634
Test: Manual
Change-Id: I23b2b20f97968696f9f00fee55094db6e551835f
2019-12-10 14:04:18 -08:00
Rahul Sabnis
4fee78ed6d Resolve BluetoothHearingAid API usages by Settings
Bug: 143244535
Test: Manual
Change-Id: Ide243e05166f03d465a50a7f2bdb82dbfd6815d0
2019-12-09 16:26:04 -08:00
Rahul Sabnis
625e1c3ef4 Resolve BluetoothA2dp hidden APIs to resolve dependencies
Bug: 143240341
Test: Manual
Change-Id: Ib55e0fb106fa7b91ef4d3559da12ea2c048f1ae5
2019-12-06 16:58:05 -08:00
Zach Johnson
bd4031de4a Merge changes from topics "merge BT bond", "parameterize BT enable", "remove BT isEnabled"
* changes:
  Collapse the implementations of BluetoothDevice.createBond
  Call parameterized version of IBluetooth.enable
  Implement isEnabled in terms of getState
2019-12-06 23:20:07 +00:00
Treehugger Robot
f6ea5afa58 Merge "Make BluetoothUuid constants and some functions System Apis" 2019-12-06 01:23:39 +00:00
Rahul Sabnis
5f457c0586 Refactor BluetoothHeadset APIs used by Settings
Bug: 143244793
Test: Manual
Change-Id: I399a1e0f93cb01c44817604edfcaa8fe5061142f
2019-12-04 16:49:21 -08:00
Rahul Sabnis
1223087ee3 Make BluetoothUuid constants and some functions System Apis
Bug: 143245929
Test: Manual
Change-Id: I5519a379a2bb5d56fe25745d8bdeaa5cf52d9e92
2019-12-04 11:24:57 -08:00
Treehugger Robot
98c91be8ae Merge "Rename priority to connection policy in bluetooth apis" 2019-12-04 01:11:46 +00:00
Rahul Sabnis
c452697717 Add SystemApi to setActiveDevice in BluetoothAdapter
Bug: 145004683
Test: Manual
Change-Id: I70f46bb0153a8a0f3755dc2b3e26e556bd092daa
2019-12-02 15:36:11 -08:00
Rahul Sabnis
df1ef4aa62 Rename priority to connection policy in bluetooth apis
Bug: 145005327
Test: Manual
Change-Id: I43ad57feb7dd70f39005ad7a01bc7dac6fb7b639
2019-12-02 14:44:54 -08:00